It's nicer to pull values when you need them than to reduce eagerly into one value, I think.
You do if you stash them. Better to do that when you need it then make the framework snapshot them always, I think.
-
-
I don't think it makes forces the framework to snapshot them, it's just a lifecycle that's called at the right moment when both exist
-
Depends on the architecture, but Glimmer can avoid work in the general case if we don't have to unconditionally pass the old snapshot.
-
I mean, if the component doesn't actually implement the hook the framework doesn't have to do anything, right?
-
And that of course assumes
@aweary is wrong, which I don't think he is - prolly just a method the fw calls with values it already has. -
I think that the old props (internally, memoizedProps) would exist at the point cWRP is called regardless due abortable work in Fiber
-
I think that's probably true, but it's not inherent. "I have this state lying around" is a good way to lock into hard-to-optz APIs.
-
Agreed, but backwards compat was a goal for 16 w/ Fiber so it was already ~locked in, maybe that could change if a better API is proposed
- 14 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.