It's very realistic that users of <Controllable> will need to access dispatch outside of render() (i.e., during lifecycle methods). React uses a ref prop to allow access to a node in lifecycle methods - <Controllable> could accept a bindDispatch prop that would do the same thing.
It's very realistic that users of
<Controllable>
will need to accessdispatch
outside ofrender()
(i.e., during lifecycle methods). React uses aref
prop to allow access to a node in lifecycle methods -<Controllable>
could accept abindDispatch
prop that would do the same thing.