Skip to content

Module reduxjs/toolkit has no exported member 'createStructuredSelector' #2140

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

Closed
vkalchuk opened this issue Mar 18, 2022 · 1 comment
Closed

Comments

@vkalchuk
Copy link

Hey, I read in the docs that a number of packages can be uninstalled since reduxjs/toolkit uses them under the hood - https://redux.js.org/tutorials/fundamentals/part-8-modern-redux#package-cleanup

However, this is not the case for 'reselect' package, particularly createStructuredSelector function. A PR was created to fix this, but it was denied.

May be by chance you reconsidered the idea and would like to include createStructuredSelector in exports of reduxjs/toolkit?
If still no, could the docs be updated then? Probably there are some other functions from redux, redux-thunk, reselect packages that are not exported in reduxjs/toolkit? Would be nice to have a list of those.

Thank you!

@markerikson
Copy link
Collaborator

I don't want to have RTK re-export everything from every package it depends on. We re-export the major functions for convenience (createSelector, produce/createNextState) or specific functions that we recommend ( current). To me createStructuredSelector still doesn't fall into either of those categories, and neither does something like new Immer().

Also note that the tutorial page is not intended to cover every last detail of either RTK or the related libraries. The tutorial page as written is accurate - previously there was an explicit import of createSelector from Reselect, and now that RTK has been added it can be changed.

So, at the moment I don't feel that there's any changes we need to make here.

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

No branches or pull requests

2 participants