A CLI tool that bridges React Native modules & UI components with ease π
JavaScript
1,019
88 commits
updated Jan 12, 2023
Bridging native modules & UI components made easy! If you're a JavaScript developer writing your first lines of native code or a more experienced developer looking to eliminate boilerplate from your React Native workflow, this tool is for you.
npm install --save react-native-create-bridge or yarn add react-native-create-bridgereact-native new-moduleDepending on your environment, there may be a couple more steps that you have to take. In future versions of react-native-create-bridge, we want to eliminate these steps.
MainApplication.java in android/app/src/main/java/com/yourapp@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new YourModulePackage()
);
}
import com.yourapp.yourmodule.YourModulePackage;android/build.gradle, add ext.kotlin_version = '1.1.2-4' to the buildscript and classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" to your dependenciesandroid/app/build.gradle, add apply plugin: 'kotlin-android' to the top of the file. At the bottom, add compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" to your dependenciesCode > Convert Java file to Kotlin file in the top menuMainApplication.kt in android/app/src/main/java/com/yourappoverride fun getPackages(): List<ReactPackage> {
return Arrays.asList(
MainReactPackage(),
YourModulePackage(),
)
}
import com.yourapp.yourmodule.YourModulePackageAdd Files To YourApp. Select the files associated with your module and click AddAppDelegate.h, MainApplication.java) to complete the bridging processcd to where you cloned itnpm install or yarnnpm run package:devreact-native new-module locally in a React Native project to test your changesnpm run test will run the Jest test suitereact-native-create-bridge is a new project and we would love feedback from the community on how it should evolve. Please report any πs and let us know how you're using react-native-create-bridge!
If you would like to contribute, please read the contributor guidelines first.
This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].
A big thank you goes out to these awesome people for their contributions (emoji key):
Kurtis Kemple π» | Duy Bao Nguyen π» | Mike Grabowski π¬ | Peggy Rayzis π» π π | Mihovil π | AndrΓ© Neves π |
|---|---|---|---|---|---|
Jarret Moses π» π |
This project follows the all-contributors specification. Contributions of any kind welcome!
Overall
Maintained
Code review
Latest release
Releases this year
1,558 followers Β· starred Aug 2017
783 followers Β· starred Jul 2017
2,625 followers Β· starred Jul 2017
140 followers Β· starred Jul 2018
A CLI tool that bridges React Native modules & UI components with ease π
JavaScript
1,019
88 commits
updated Jan 12, 2023
Bridging native modules & UI components made easy! If you're a JavaScript developer writing your first lines of native code or a more experienced developer looking to eliminate boilerplate from your React Native workflow, this tool is for you.
npm install --save react-native-create-bridge or yarn add react-native-create-bridgereact-native new-moduleDepending on your environment, there may be a couple more steps that you have to take. In future versions of react-native-create-bridge, we want to eliminate these steps.
MainApplication.java in android/app/src/main/java/com/yourapp@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new YourModulePackage()
);
}
import com.yourapp.yourmodule.YourModulePackage;android/build.gradle, add ext.kotlin_version = '1.1.2-4' to the buildscript and classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" to your dependenciesandroid/app/build.gradle, add apply plugin: 'kotlin-android' to the top of the file. At the bottom, add compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" to your dependenciesCode > Convert Java file to Kotlin file in the top menuMainApplication.kt in android/app/src/main/java/com/yourappoverride fun getPackages(): List<ReactPackage> {
return Arrays.asList(
MainReactPackage(),
YourModulePackage(),
)
}
import com.yourapp.yourmodule.YourModulePackageAdd Files To YourApp. Select the files associated with your module and click AddAppDelegate.h, MainApplication.java) to complete the bridging processcd to where you cloned itnpm install or yarnnpm run package:devreact-native new-module locally in a React Native project to test your changesnpm run test will run the Jest test suitereact-native-create-bridge is a new project and we would love feedback from the community on how it should evolve. Please report any πs and let us know how you're using react-native-create-bridge!
If you would like to contribute, please read the contributor guidelines first.
This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].
A big thank you goes out to these awesome people for their contributions (emoji key):
Kurtis Kemple π» | Duy Bao Nguyen π» | Mike Grabowski π¬ | Peggy Rayzis π» π π | Mihovil π | AndrΓ© Neves π |
|---|---|---|---|---|---|
Jarret Moses π» π |
This project follows the all-contributors specification. Contributions of any kind welcome!
Overall
Maintained
Code review
Latest release
Releases this year
1,558 followers Β· starred Aug 2017
783 followers Β· starred Jul 2017
2,625 followers Β· starred Jul 2017
140 followers Β· starred Jul 2018