Selector Re-renders my component everytime even when no subscribed state is changed. #4374
Unanswered
MuhammadAli13562
asked this question in
Q&A
Replies: 1 comment 3 replies
-
objects aren't compared deeply, they're compared by reference - if anything changes inside any of the inputs returned, the output selector will be called again, returning a new value and causing a rerender. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to have a component avoid subscribing to ctx_win.chatMessages and thus returning only the meta info about ctx_win in the returned object. But either way whenver chatMessages change the selector not only recomputes which it has to , but it also re-renders the component subscribing only to this meta info on the ctx_win.
Am i doing something wrong with returning an object because as far as i have read in docs object is deeply compared rather than just its reference.
Beta Was this translation helpful? Give feedback.
All reactions