https://github.com/dev-chief/react-native-ci
Connection Native Modules c++ with React Native > 0.60 (Android and IOS)
https://github.com/dev-chief/react-native-ci
bridge cxxmodule javascript jni
Last synced: 3 months ago
JSON representation
Connection Native Modules c++ with React Native > 0.60 (Android and IOS)
- Host: GitHub
- URL: https://github.com/dev-chief/react-native-ci
- Owner: dev-chief
- License: mit
- Created: 2020-03-14T18:39:21.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-26T18:38:22.000Z (over 2 years ago)
- Last Synced: 2025-01-21T11:09:57.314Z (5 months ago)
- Topics: bridge, cxxmodule, javascript, jni
- Language: JavaScript
- Homepage:
- Size: 1.64 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React native C++ Native Modules (Android version)
Connect Native Modules C++ in React Native > 0.60.
[](https://nodesource.com/products/nsolid)
[
[](https://github.com/dev-event/react-native-ci)
There is a more straitforward way to connect C++ in React Native.
The CxxModule is it, and there is a sample as well.
Unfortunately, setup CxxModule on Android right now is getting a little difficult.
Modules allow you to do:
- Encryption
- Image Processing
- and other...And you are willing to do a little extra work you can use [Djinni](https://github.com/sulewicz/djinni-react-native).
Djinni is a codegen for different languages, but there still some overhead.Especially on Android, a JS call might be in such flow:
JS -> RNBridge in JS VM -> JNI -> Android VM -> Java NativeModule -> JNI -> C++
The back and forth between JNI is redundant and wasted in command serialization/deserialzation.This project generates interface bindings for Objective-C and Java. Once you create the wrapper code for C++, you can create Java and Objective-C classes that integrate with React Native. Thus React will call Obj-C/Java which will call C++. Profit.
### Installation
React Native version > 0.60
```sh
$ yarn install
```
### DocumentationUse data from a table to convert values.
| Plugin | README |
| ------ | ------ |
| jsArgAsBool |(args, 0) |
| jsArgAsInt | (args, 1) |
| jsArgAsDouble | (args, 2) |
| jsArgAsString | (args, 3) |
| jsArgAsArray | (args, 4) |
|jsArgAsObject | (args, 5) |#### Telegram : dev_event
License
----MIT