What is the suggested way to migrate over to v5? #711
-
Hello 👋🏻 In our app we used selector factories intensively. Actually we used to create groups of those and pass it via context to underlying components. This way we could reuse cache along the whole tree.
Since v5 is out with weakMap cache possibilities what is the suggested way of writing parametriezed selectors? Should we abandon factories? Should we drop all our Thank you in advance for any tips |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
In theory, yeah, most cases where you may have been doing selector factories to account for unique arguments ought to be replaceable with just using I'm interested in hearing how well that works for you in terms of perf and behavior! |
Beta Was this translation helpful? Give feedback.
In theory, yeah, most cases where you may have been doing selector factories to account for unique arguments ought to be replaceable with just using
createSelector
once to create a single selector instance, and using that everywhere instead.I'm interested in hearing how well that works for you in terms of perf and behavior!