React redux-driven Popup system.
With npm do:
$ npm install @time-with/popup
or
$ yarn add @time-with/popup
Add the Component to the root Router of your React layout
import Popup from '@time-with/popup'
render() {
return (
<Router>
<div id='layout-root'>
<Popup />
// ...
Import the reducer to your reducers combiner
import { popupReducer } from '@time-with/popup';
export {
// other reducers
popupReducer,
};
import { popupActions } from '@time-with/popup';
popupActions.showPopup( <SomeReactComponent /> );
MIT