Closed jhoch-nmnl closed 1 year ago
@jhoch-nmnl the new version has a new format for doing context, so I think that this might no longer be the case.
If this seems like it's still a problem, can you please review and add a some test case? The testing was redone using vitest
as part of V2
Finally, I'm very sorry that this has sat around so long without a comment or review. We'll try to do better going forward.
Description of the change
I was testing whether jotai-molecules is a good fit for some of our state management needs, and ran into an issue during prototyping where a
ScopeProvider
would trigger downstream component renders more often than seemed necessary. I think I pinned down the problem, to an array instantiation that happens without memoization on every render of theScopeProvider
.This change memoizes this array that is passed to the
Context.Provider
.Note: I want to add a test or two to cover this but wanted to get feedback on whether this is a welcome change or not, first.
Type of change
Links
Checklists
Development
Paperwork
Code review