Skip to content

@markerikson markerikson released this May 1, 2019 · 295 commits to master since this release

Our previous alpha versions included both useSelector() (similar to mapState) and useActions() (similar to mapDispatch).

However, Dan Abramov strongly suggested that we consider removing useActions(), as the idea of "binding action creators" is less relevant when using hooks, and also adds conceptual overhead and syntactic complexity. We requested feedback from alpha users, and the initial feedback agreed with Dan's suggestion.

Based on that feedback, v7.1.0-alpha.4 removes the useActions() hook. Instead, call useDispatch() in your component, and manually call dispatch(someActionCreator()) in callbacks and effects as needed.

If you still wish to use useActions(), the hooks alpha docs page has an implementation you can copy and paste into your own code.


Assets 2