-
-
Notifications
You must be signed in to change notification settings - Fork 195
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 React Server Component support #502
Conversation
Assume if we change this to I’d love for the web version to use |
I think our SafeAreaView component could (almost) be as simple as:- const SafeAreaView = (props) => {
const style = { ...StyleSheet.flatten(props.style) }
if (props.edges.includes('top')) {
style.paddingTop = `calc(env(safe-area-top, 0px) + ${style.paddingTop ?? style.paddingVertical ?? style.padding ?? 0}px)`
}
// ...
return <View style={style}>{props.children}</View>
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, sounds good. If someone wants to contribute a server component version later it would be great.
@jacobp100 "use server" defines functions that run in the server, essentially API routes. In an RSC world, the default is In the future, we'll want to shift more binding code to the native side and expose the globals directly so native apps can tree-shake as much JS as possible. Here's a little more about how I see that working 0kb React Native components. |
@EvanBacon I was more meaning that the user might have some components behind a SAV that aren't marked as |
Released as 4.10.4 Thanks! |
Summary
Test Plan