This implementation is primarily based off this StackOverflow answer by Dan Abramov.
- Stores the following information in the Redux store:
- Whether the modal is visible (
isVisible
) - The modal type (
modalType
) - Data for the modal being rendered (
modalProps
) - Configuration object for customising the modal behavior (
settingsProps
which containshouldHideOnOverlayClick
andshouldHideOnEscapeKeyDown
)
- Whether the modal is visible (
- Exposes class name hooks for styling of modal subcomponents
- Allows server-side rendering of the modal
$ git clone
$ npm install react redux react-redux
$ npm install
$ npm install --global gulp
$ gulp example --open
Install via npm:
$ npm i --save @yuanqing/react-redux-modal