createGate(name?)
Creates a Gate
Arguments
name
? (string)
Returns
(Gate
)
Example
const Gate = createGate('gate with props')
const App = () => (
<section>
<Gate foo="bar" />
</section>,
)
ReactDOM.render(<App />, document.getElementById('app'))
Gate.state.getState()
// {foo: 'bar'}
Gate.current
// {foo: 'bar'}
ReactDOM.unmountComponentAtNode(document.getElementById('app'))
Gate.state.getState()
// {}
Gate.current
// {}