Redux Ecosystem Integration

Reduck is based on Redux, so you can use libraries from the Redux ecosystem to enhance its functionality. APIs like Provider, createApp, and createStore allow you to configure the use of middlewares and store enhancers; and using createStore, you can take complete control over the process of creating the store.

For example, if we want to use the middleware redux-logger, the example code is as follows:

ReactDOM.render(
  <Provider config={{ middlewares: [logger] }}>
    // Set middleware through the config parameter of Provider
    <App />
  </Provider>,
  document.getElementById('root'),
);
CAUTION

Reduck is built on top of the lower-level Redux API, and abstracts away some of the underlying concepts of Redux, such as Reducers. Reduck allows models to be dynamically mounted, whereas Redux mounts all the necessary state at Store creation time. Due to these implementation differences, some libraries from the Redux ecosystem cannot be used directly in Reduck.