To support the RSC context, all React needs to do is allow exporting getServerTreePath, and the rest can be done in userland.
React already has `currentlyRenderingTask` internally. Can't fit the whole patch in a screenshot, but you get the gist.
1
89
The nice thing about _document was being able to control the post-app render. You could collect things from the tree render in a single place to add to the head (react-helmet), body, etc.
I give you: onBeforeInitialFlush, insertHtml, insertSlotHtml, <RenderSlot>, and more!
1
67
Replying to @timneutkens
My bad, this is kind of what I gathered from v0, which reads a bit differently.
Still, you're confirming it's nowhere near the roadmap, which isn't great.
Not every use case should be supported upstream, which is the whole point of providing lifecycle hooks.
2
443
This Twin Peaks day hits harder than usual… #TwinPeaksDay 🥲
83
It's great that this works for event handlers.
It'd be amazing if this could work for ref functions, too (it currently doesn't) 😞
1
220















