-
Notifications
You must be signed in to change notification settings - Fork 6
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
Question - Selectors in workers #10
Comments
I think so. I assume you mean to use those selectors in reducers.
Hm, so you mean the selector functions you pass to useSelector are heavy? |
Thanks for the quick response! Our state is normalized indeed. We have some heavy parts in the reducers, where a certain action needs to update several parts of the state. But the most heavy part is in the selectors though, where we combine and calculate data from the state before giving it to a component. So in our case I guess it would make sense to try to move the selectors to a web worker. I will make a proof of concept. I'm also looking at https://github.com/HerbCaudill/react-redux-worker , it looks like the selectors you pass to useSelector run in the worker in that package. You can close this question if you want, I'll come with an update later when I have time for the poc. |
Cool! Look forward to hearing updates. Feel free to drop questions about impl / expected behavior. |
Hi!
Your library looks very interesting and promising for our use case. We're working on a very big planning application with a lot of data in a redux store.
The state is quite flat and we use selectors (with reduxjs/reselect) to combine several parts of the state to get different filtered and nested data structures optimized for rendering in React. These selectors are the most heavy part of the application.
Would it be possible to move these selectors to a webworker as well?
Would Redux
useSelector
be able to import the selector from the webworker?The text was updated successfully, but these errors were encountered: