Cool pop-ups related to URL with React 16.3+ and Mobx 3+.
npm
npm i react-mobx-routing-modal
yarn
yarn add react-mobx-routing-modal
All modals should be placed into Modals
.
import RouterModal, {Modals, OpenModal} from 'react-mobx-routing-modal'
import theme from 'react-mobx-modal/theme/default.module.scss'
export default () => (
<>
<OpenModal id='test'>Open</OpenModal>
<Modals className={theme.modals}>
<RouterModal id='test' delay={300} classNames={theme}>
Test modal
</RouterModal>
</Modals>
</>
)
If you find a bug, please file an issue on GitHub