Skip to content

Question about the guarantees of useMemo #3027

Discussion options

You must be logged in to vote

It's a guarantee we can bring, we'd have to look at a few of the current things we're doing in Suspense but generally we're not planning to support something as the likes of concurrent mode.

React implements an idea of lanes, a lane can be used to perform work in, this means that if you memoize something in lane 1 but this isn't used that it will have a different reference in a potential other lane. As we are not implementing this assumption voids when porting it to Preact, do note that there could currently be an issue with Suspense when it comes to this exact case 😅 currently we are erasing all hooks state both on initial and subsequent suspense, this is something React doesn't do I thi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@CarsonMcKinstry
Comment options

Answer selected by CarsonMcKinstry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants