-
Notifications
You must be signed in to change notification settings - Fork 26
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
PoC: use raw jsi::Value
prop w/ fabric views
#386
base: main
Are you sure you want to change the base?
Conversation
Includes changes from: facebook/react-native#48047
0.76.2 fixed this error: facebook/react-native#46208
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
"pods": "cd ios && bundle exec pod install && rm -rf .xcode.env.local", | ||
"pods": "cd ios && bundle exec pod install", |
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.
btw: without this change i can't run the example app. I am pretty sure that deleting the .xcode.env.local is wrong.
Will remove this change in a moment though
Okay, i am still missing one piece, seems like the props parser currently removes our prop:
fixing … |
convert to kotlin still missing
prop updates are broken yet
Moved code to set props to state to adopt() as thats always called for creation & updates
…c/views-with-nativestate-props
@mrousavy android is good as well now. In the same phase in which the new props are updated we get the update on the java side, so I think there is no weird back and forth. We have to use the state wrapper on android as this is the only thing thats shared between c++ and java for the view manager (props are always eagerly converted to folly::dynamic). |
Updated 👍 |
jsi::Value
prop w/ fabric viewsjsi::Value
prop w/ fabric views
} | ||
|
||
export const CustomView: HostComponent<NativeProps> = | ||
NativeComponentRegistry.get<NativeProps>('CustomView', () => viewConfig) |
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.
Why does requireNativeComponent(..)
not work here?
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.
it might, we'd have to test this
How to setup:
(I had to update to RN >= 0.76.2 to fix a build issue where some yoga header could not be found)
git clean -dfX
bun i
npx patch-package
bun run build
PRs in react-native to get it work:
RawPropsParser
adduseRawPropsJsiValue
parameter facebook/react-native#48231RawPropsParser
as optional parameter to Concrete-/ComponentDescriptor facebook/react-native#48232RawValue
directly fromjsi::Value
facebook/react-native#48047getState
forStateWrapperImpl
facebook/react-native#48255