Redux reselect state questions
I'm using redux without react for a side project. But is seems I must pass every time the state to the function. Is there any example todo it without passing the state and that is still testable? I know the package @wordpress/core-data has a solution for this problem but it seems really complicated to me for such thing, do you have any solutions?
Posted Dec 30, 2020, 12:48 AM UTC
01
Redux has getState() which might help you. But you'll need to provide a few more specifics if you really want help as I don't know what function you mean when you say passing state to the function.
But using getState should allow you to access your state object without passing it as a parameter in most situations.
Edit: Check out this post by Dave Ceddia for more