Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add basic React Server Component support #2170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EvanBacon
Copy link
Contributor

@EvanBacon EvanBacon commented Jun 4, 2024

Description

Add basic support for React Server Components support.

Related PRs for more context:

Changes

  • Added basic React Server Component support

Test code and steps to reproduce

  • It's kinda hard to test this E2E. I wrote a small jest runner in jest-expo which executes in RSC mode, but it requires React 19 to work. Here's where I tested this patch feat(jest-expo): add experimental RSC testing library expo/expo#29404
  • It will likely break between now and the full release, but this should at least reduce the number of patches required to work on Expo Router support.
  • There's pretty good compilation on web:
2:I["../../node_modules/react-native-web/dist/exports/View/index.js",[],""]
3:I["../../node_modules/react-native-web/dist/exports/Image/index.js",[],""]
1:{"name":"ScreenStackHeaderBackButtonImage","env":"Server","owner":null}
0:D"$1"
0:["$","$L2",null,{"children":["$","$L3",null,{"resizeMode":"center","fadeDuration":0},"$1"]},"$1"]
  • And more opaque compilation on native platforms:
1:I["../../node_modules/react-native-screens/src/components/ScreenStackHeaderConfig.tsx",[],"ScreenStackHeaderBackButtonImage"]
0:["$","$L1",null,{},null]

Checklist

@tboba tboba requested review from tboba and kkafar June 4, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant