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 tomapState
) anduseActions()
(similar tomapDispatch
).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, calluseDispatch()
in your component, and manually calldispatch(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 )