Generate react-native library with native code: Kotlin, Swift #32304
Replies: 9 comments
-
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
Beta Was this translation helpful? Give feedback.
-
Not stale |
Beta Was this translation helpful? Give feedback.
-
in nx react native app, how can i use a library with react native code? Thanks in advance. @whalemare |
Beta Was this translation helpful? Give feedback.
-
This is very much required feature, especially for |
Beta Was this translation helpful? Give feedback.
-
You can do it by generating a local RN library using create-react-native-library. Afterwards you can manually link this library in your NX workspace by adjusting the Note that in order for RN autolinking to work properly, you will need to add this local package as a dependency in each app that needs to use it. So you will have:
|
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it hasn't had any activity for 6 months. |
Beta Was this translation helpful? Give feedback.
-
Bump |
Beta Was this translation helpful? Give feedback.
-
Any news ? |
Beta Was this translation helpful? Give feedback.
-
This is still an important discussion. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I want to generate react-native library that includes not only
js
code, but also native part with Kotlin, Swifthttps://nx.dev/packages/react-native/generators/library
Motivation
Native dependencies it's important part of any react-native project. NX already supported react-native libraries with native code, but can't generate it yet
Suggested Implementation
Usage: something like that
yarn nx g @nrwl/react-native:library --withNativePart
Alternate Implementations
Beta Was this translation helpful? Give feedback.
All reactions