Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thegamenicorus/turbomoduleplayground
Playing with React Native's new architecture:: JSI and TurboModules
https://github.com/thegamenicorus/turbomoduleplayground
Last synced: about 2 months ago
JSON representation
Playing with React Native's new architecture:: JSI and TurboModules
- Host: GitHub
- URL: https://github.com/thegamenicorus/turbomoduleplayground
- Owner: thegamenicorus
- Created: 2019-12-22T06:16:13.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T03:41:57.000Z (almost 2 years ago)
- Last Synced: 2024-08-04T01:25:43.032Z (5 months ago)
- Language: Java
- Size: 797 KB
- Stars: 56
- Watchers: 4
- Forks: 4
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TurboModulePlayground
## First things first
- This repository is nothing, just try to simulate how TurboModule, and CodeGen work together.
- TurboModule and CodeGen are not yet formally released. It may change in the future. **_Do not use this project for production._**
- only iOS is supported at the moment. PRs for Android are welcome.
## Getting started
1. Clone this repository.
2. Run `npm install` , all required components will be installed automatically.### iOS
1. Run `pod install` from `TurboModulePlayground/ios` folder.
2. Start XCode and open generated `TurboModulePlayground.xcworkspace`.### Android
no steps required.
## Create your turbo module
### iOS
1. Create a Spec file at `src/turbomodules`. Each Spec file is named `Native*.js` for ObjC module **OR** `Native*Cxx.js` for C++ module, where `*` is the name of the NativeModule.
2. Run `npm run codegen`. Then TurboModuleSpec and TurboModuleCxxSpec will be generated at `Xcode/TurboModulePlayground/turbomodule/spec`
3. Add your native file into Xcode.
4. Add your turbo module name into `Xcode/TurboModulePlayground/turbomodule/TurboModuleProvider.mm`
### Android
not yet supported.
## More about Spec file and supported types.
https://github.com/facebook/react-native/issues/24875#issue-444697876