hiebj / stately

elegant, type-safe state management
2 stars 1 forks source link

stately-react: Controllable should allow access to `dispatch` outside of `render()` #29

Open hiebj opened 5 years ago

hiebj commented 5 years ago

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.