v5.0.0-alpha.6
Pre-releaseThis is an alpha release for Redux 5.0, and has breaking changes. It changes store.dispatch
to require that action.type
must always be a string.
Changelog
Action Types Must Be Strings
We've always specifically told our users that actions and state must be serializable, and that action.type
should be a string. This is both to ensure that actions are serializable, and to help provide a readable action history in the Redux DevTools.
store.dispatch(action)
now specifically enforces that action.type
must be a string and will throw an error if not, in the same way it throws an error if the action is not a plain object.
In practice, this was already true 99.99% of the time and shouldn't have any effect on users (especially those using Redux Toolkit and createSlice
), but there may be some legacy Redux codebases that opted to use Symbols as action types.
TS Support Updated
We've updated our supported TS version matrix to be TS 4.7 and higher.
What's Changed
- Change TS tests to only be 4.7 onwards by @EskiMojo14 in #4545
- Require action types to be strings by @EskiMojo14 in #4544
Full Changelog: v5.0.0-alpha.5...v5.0.0-alpha.6