mark all of react-native as client boundary for React Server Components #43986
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
While developing React Server Component support for React Native, I've been adding this patch to the
react-native
package. It opts the entirereact-native
package out of being server rendered.In the future, we'll want to circle back and refactor the
react-native
package to be more isomorphic so we can allow for utilities likeprocessColor
to be used in server bundles that target native platforms.Changelog:
[GENERAL] [ADDED] - Added support for importing
react-native
in areact-server
environment for React Server Components support.Test Plan:
Using react-native with this patch in a framework that supports React Server Components for native platforms, such as my unreleased branch of Expo Router, will allow for server rendering views from
react-native
to RSC Flight code with client references to thereact-native
package, e.g.Can be server rendered to ↓