Temporary retain #68
loganvolkers
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In #64 there is a discussion about using the approach from
@isograph/react-disposable-state
to temporarily retain molecule values between initial render and commit.Ideally this is something that the core React team will acknowledge as a limitation in their design of strict mode, and provide something like
useSyncExternalStore
that allows for disposing of snapshots instead of requiring completely ephemeral snapshots.In the meantime the
setTimeout
based temporary retain solution in@isograph/react-disposable-state
is one of the best that I've found. Unfortunately it leaves me with some big questions more than answers.scoper
? orinjector
? or both? Or only to the React adapter?@isograph/react-disposable-state
? What are the effects of each approach on size and performance?Beta Was this translation helpful? Give feedback.
All reactions