Skip to content

Commit

Permalink
docs: add inject
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Sep 8, 2020
1 parent 130d16e commit ade32c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ class App extends React.Component {
const ctx = require.context('./modals/', true, /\.js$/);
return (
<div className="app-container">
<ReactModalManager context={ctx}>
<ReactModalManager
context={ctx}
inject={(e) => {
window.store = e;
}}>
<h2 style={{ marginBottom: 20 }}>My Modals App</h2>
<center>
<img src="http://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg" />
Expand Down

0 comments on commit ade32c3

Please sign in to comment.