Hey, how can I try something like this? Can I do it within a normal RN project already or is there a special setup needed? Can you share what have you used as an example/guide/boilerplate?
-
-
-
It works with >= RN 0.59, IIRC This is a small example: https://github.com/facebook/react-native/blob/master/Libraries/Blob/RCTBlobCollector.mm#L27 … You call a function like that from your RCTViewManager subclass' setBridge method. Then you write a function that returns JavaScript objects like this: https://github.com/chrfalch/react-native-reanimated/blob/jsi-methods/ios/REAJsiModule.mm#L39 … That's it
- Još 1 odgovor
Novi razgovor -
-
-
Something not totally clear to me. In new architecture, should I know JS Swift Kotlin and now c++ to be a productive fullstack RN developer? That starts to be a lot to learn.
-
Definitely not necessary I don’t think many react native developers will end up writing C++ at all, just as few write Swift or Kotlin or Objective C right now. When TurboModules is rolled out, C++ will be even more uncommon
- Još 8 drugih odgovora
Novi razgovor -
-
-
TurboModules looks really cool (along with react-native-codegen). I tried using TurboModules for this but couldnt get the app to build though :( It was an issue with folly/Optional.h not being found, I spent a couple hours trying things and then gave up
Kraj razgovora
Novi razgovor -
-
Is it possible to do this without blocking, too?
-
Yeah, you can return a Promise or a callback and then the C++ code can run stuff in a separate thread
Kraj razgovora
Novi razgovor -
-
-
What's the js calling it like?
-
global.MediaPlayerViewManager.getPhotos and I pass it a dictionary of options similar to react-native-camera-roll “MediaPlayerViewManager” is an ugly name but I can change that later
- Još 1 odgovor
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.