[Fax] Support nesting in existing RSC renderers
Summary
This chains the async dispatchers similarly to what we did https://github.com/facebook/react/pull/28488.
The cache between nested renderers is shared prioritising the one that was first registered during module evaluation (an earlier version cached in both but I couldn't think of a case where we need this behavior).
Parent stacks and Owner stacks currently don't work in onError of react-markup. I'd need to think about this more but it's dev-only.
Test plan
- Added new test for nesting RSC renderers (ReactNoopFlight + ReactMarkup) which produced the "Currently React only supports one RSC renderer at a time." error initially.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| react-compiler-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 4, 2024 2:34pm |
Comparing: d1afcb43fd506297109c32ff462f6f659f9110ae...da393281cf3bed5fb0cf1b58b06a4295076173e8
Critical size changes
Includes critical production bundles, as well as any change greater than 2%:
Significant size changes
Includes any change greater than 0.2%:
Expand to show
Generated by :no_entry_sign: dangerJS against 35507c5e993e0ab0d79c2f9c8b78bab28eb7a4ab
We should chain the owner too. If there is no owner on the inner one, it should defer to the outer (previous) dispatcher to see if it has one.
We should chain the owner too. If there is no owner on the inner one, it should defer to the outer (previous) dispatcher to see if it has one.
From what I can tell they're not just broken at the dispatcher level but also with regards to getCurrentStack. I can take a look at these in a follow-up since they're dev-only and experimentation is otherwise blocked.
I can take a look at these in a follow-up since they're dev-only and experimentation is otherwise blocked.
Just keep in mind that this blocks the RSC DevTools stuff and enableOwnerStacks if they end up getting installed in the wrong order.
Just keep in mind that this blocks the RSC DevTools stuff and enableOwnerStacks if they end up getting installed in the wrong order.
Yeah, I'll get it right in this one.