Skip to content

disable useSelector re-rendering #4308

Answered by markerikson
arashi-dev asked this question in Help
Discussion options

You must be logged in to vote

Very bad, and you should never do this!.

If you only need that value when the function gets called, move the logic into a thunk and dispatch the thunk from a React event handler:

https://redux.js.org/usage/writing-logic-thunks

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by arashi-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants