Redux-Modal-Container
This library provides an easy way to show and hide modals when working with Redux.
Installation
To install the latest version:
npm install --save redux-modal-container
or
yarn add redux-modal-container
How to use
Create the modals entry point (Container component needs access to the Redux state):
;// ...
Combine the modal reducer:
;// ...const rootReducer = ;
Trigger the modal from your connected component:
;// ... Component { thisprops; }; { return <div> <button onClick=thistrigger>Open modal</button> </div> ; } null MyComponent;
A full example can be found in examples directory.
License
MIT