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

PoC: use raw jsi::Value prop w/ fabric views #386

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

hannojg
Copy link
Contributor

@hannojg hannojg commented Dec 3, 2024

Copy link

vercel bot commented Dec 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nitro-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 1:44pm

"pods": "cd ios && bundle exec pod install && rm -rf .xcode.env.local",
"pods": "cd ios && bundle exec pod install",
Copy link
Contributor Author

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

@hannojg
Copy link
Contributor Author

hannojg commented Dec 3, 2024

Okay, i am still missing one piece, seems like the props parser currently removes our prop:

[RawPropsParser.cpp:75] Looked up property name which was not seen when preparing: nativeProp

fixing …

prop updates are broken yet
Moved code to set props to state to adopt() as thats always called for creation & updates
@hannojg
Copy link
Contributor Author

hannojg commented Dec 13, 2024

@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).

@hannojg
Copy link
Contributor Author

hannojg commented Dec 13, 2024

Wait, updating the patch file …

Updated 👍

@hannojg hannojg mentioned this pull request Dec 16, 2024
5 tasks
@hannojg hannojg changed the title [WIP] poc: use raw jsi::Value prop w/ fabric views PoC: use raw jsi::Value prop w/ fabric views Dec 16, 2024
}

export const CustomView: HostComponent<NativeProps> =
NativeComponentRegistry.get<NativeProps>('CustomView', () => viewConfig)
Copy link
Owner

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?

Copy link
Contributor Author

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

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.

2 participants