-
I can't imagine I'm the first person to ask, so I apologize if it's a duplicate post- but i couldn't find an example that accomplished exactly what I was looking and would really appreciate some feedback to ultimately better understand In short, I'm looking to reduce the number of Providers in my project, which has so far been a breeze by directly consuming queries in abstracted components, however, I've found there are still a number of instances where I'm performing expensive calculations that depend on multiple My question is: given the following example hook, does the
Hopefully that makes sense, sorry again if it's a repost but I genuinely appreciate your responses! Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
render cycles yes, components not. Every component gets their own “observer”, so it runs at least once per component.
by memoizing the |
Beta Was this translation helpful? Give feedback.
render cycles yes, components not. Every component gets their own “observer”, so it runs at least once per component.
by memoizing the
combine
function by its inputs, outside of React.reselect
is a library that does this well, ormemoize-one
.