v1.5.5 - Deprecation #189
EskiMojo14
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This patch release deprecates the
configureStore
method, as this package does not align with the Redux team's recommended testing practices. Instead, we recommend testing with a real store.Testing with a mock store leads to potentially confusing behaviour, such as state not updating when actions are dispatched. Additionally, it's a lot less useful to assert on the actions dispatched rather than the observable state changes.
You can test the entire combination of action creators, reducers, and selectors in a single test, for example:
This avoids common pitfalls of testing each of these in isolation, such as mocked state shape becoming out of sync with the actual application.
legacy_configureStore
We recognise that for many codebases, migration will be a major effort that some may not be able to allocate time for.
The
@deprecated
tag is just a visual strikethrough, but some tools will add extra warnings when it is used.We now have a
legacy_configureStore
export (similar tolegacy_createStore
in Redux core) which is the same function but without this tag. You can change any imports to use this if the deprecation notice presents significant issues for you.Full Changelog: v1.5.4...v1.5.5
Beta Was this translation helpful? Give feedback.
All reactions