Redux-wrapper for React-components. As DRY as the desert: takes care of managing all boilerplate-code and lets you focus on the state-reducing functions. Supports saga-integration. Furthermore makes importing of actions/state-props from other Redux-components as simple as possible.
Quick Intro
redux-sands
gives you a single class as default export, from now on called ReduxWrapper
. Here's a simple example that demonstrates how you could use it:
;; // Instantiate the wrapper.const wrapper = called: "example" ; // Simply add the initial state, the component for render + a reducer.wrapper ; // Expose the redux-wrapper as any other redux-component.connection;const reducer = wrapperreducer;
And now let's call it:
{ // When using 'ReduxWrapper', only an object as param is allowed. // Provide your values then via that object. return <div => Increment </div> ; }
As far as basic use cases go, that's it! No more hassle with manually creating actions, mappings and endless switches. Action-types get inferred automatically, as well as the linking to the reducer. You can focus on the actual app logic without having to deal with refactoring etc.