react-redux v7.1.0-alpha.4 Release Notes

Release Date: 2019-05-01 // almost 5 years ago
  • 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.

    Changes

    • ✂ Remove useActions ( 54fd9dd )