react-cmf-cqrs

0.111.0 • Public • Published

Content Management Framework for CQRS (aka cmf-cqrs)

This is a library to help you to build configurable React App with CQRS pattern.

NPM

Travis CI Quality dependencies devdependencies Codacy Badge

Breaking changes log

Before 1.0, react-cmf-cqrs do NOT follow semver version in releases. You will find a list of breaking changes here.

Content

This package provides tools to deal with cqrs backend allowing websocket handling :

  • acknowledgement actions
  • ACKDispatcher component
  • Smart Websocket middleware
  • ACK reducer

How it works

  • to start the websocket with smartWebsocket middleware :
ws = new SmartWebsocket(urlPrefix, {
    onOpen: () => dispatch({ type: ACTION_TYPES.ON_OPEN }),
    onClose: () => dispatch({ type: ACTION_TYPES.ON_CLOSE }),
    onMessage: (messageEvent) => {
        dispatch({ type:onMessage, message:messageEvent });
    },
});

In onMessage event, you should get middleware handlers as well.

  • On the reducer, actions handled :
    • ACK_ADD_CONTEXT : Used to add a new request on stack
    • ACK_RECEIVE_MESSAGE : Used when a message come from the ws
    • ACK_DELETE : Used when you want to delete a handler

Readme

Keywords

Package Sidebar

Install

npm i react-cmf-cqrs

Weekly Downloads

16

Version

0.111.0

License

Apache-2.0

Last publish

Collaborators

  • frassinier
  • glorieux
  • jmfrancois
  • jsomsanith
  • sromain
  • talend-frontend