As a React Native developer, I appreciate the flexibility that comes from the framework's cross-platform functionality. But, there are moments when...
For further actions, you may consider blocking this person and/or reporting abuse
useful article
Really helpful!
does Turbo Module support send event from native to JS ?
Error: Unable to resolve module rtn-calculator/js/NativeCalculator from F:\TurboDemo\MyApp\App.tsx: rtn-calculator/js/NativeCalculator could not be found within the project or in these directories:
node_modules
8 | import {useState} from 'react';
9 | import {SafeAreaView, StatusBar, Text, Button} from 'react-native';
Can somebody please help me out with this ? I have followed all the instruction properly.
Hey Manish,
Sometimes your node_modules get cached and the RTNCalculator wont have installed. I'd recommend deleting your
node_module
and running ayarn
again!Move it inside the app folder
Hi.
I am stuck with
./gradlew generateCodegenArtifactsFromSchema
I am getting this error
Could not find com.android.tools.build:gradle
But i just copy-pasted the build.gradle here with the said dependency included.
Hey Aldrin,
Are you running the command from the DeviceName project folder?
I have cleared the cache run on different device deleted node modules and re-installed still getting error dev.to/amazonappdev/a-guide-to-tur...
: Error: Unable to resolve module rtn-device/js/NativeGetDeviceName from C:\Users\preetip\Projects\TurboModulesDemo\DeviceName\App.tsx: rtn-device/js/NativeGetDeviceName could not be found within the project or in these directories:
node_modules
27 |
Hey Preeti,
From the TMDemo folder ensure you are adding the TurboModule to your app by running:
yarn add ../RTNDeviceName
It worked as i moved it inside project
Ah yes, both projects need to be in the same folder.
Hi Anisha,
As you mentioned about that it will only run on android app, so now we are unable to run the application on iOS because the current setup requires an interface for communication between iOS and React Native, which is not yet implemented. Currently, our solution is compatible solely with Android-specific modules (using Turbo Modules), which restricts functionality to Android applications. please correct me If I am wrong.
Is it possible to run the same app on IOS with android specific turbo modules?
Thankyou.
Hey yes, I just work on Android hence the focus on Android.
You need to create an IOS folder similar to the Android one. The React Native docs have an example: reactnative.dev/docs/native-module....