Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createImmutableStateInvariantMiddleware not actually exported #448

Closed
exogen opened this issue Mar 27, 2020 · 3 comments · Fixed by #449
Closed

createImmutableStateInvariantMiddleware not actually exported #448

exogen opened this issue Mar 27, 2020 · 3 comments · Fixed by #449

Comments

@exogen
Copy link
Contributor

exogen commented Mar 27, 2020

Hello! 👋

The Other Exports docs say that createImmutableStateInvariantMiddleware is exported, but it doesn't seem to actually be there: https://github.com/reduxjs/redux-toolkit/blob/master/src/index.ts

@markerikson
Copy link
Collaborator

Good catch! Can you file a PR to export things from that file?

Also, out of curiosity, do you have a specific use case for needing to call it directly, or is this just observing a bug?

@exogen
Copy link
Contributor Author

exogen commented Mar 27, 2020

Done!

My app currently uses most of the pieces of the toolkit piecemeal instead of the higher level helpers (it uses redux-dynamic-modules for instance, so we have our own store creation). But in this particular case I may be able to use getDefaultMiddleware, assuming it doesn't matter whether other middleware comes before the immutable state invariant one (I do have some that needs to come before thunk).

@markerikson
Copy link
Collaborator

Yeah, ideally the immutable and serializable check middleware come last in the sequence so they can catch things downstream of thunks and such anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants