This is a tool that uses react-native-codegen to generate native code that can be used with JSI. It takes a given flow schema and converts it into native modules - those are interfaces that can be implemented in order to create a custom native logic that can be called from React Native javascript code through JSI.
You can find codegen's code here.
- Clone this repository
cd codegen-toolyarnyarn gen-flowfor the flow schema oryarn gen-tsfor the TypeScript schema(TS seems to be not supported for now)- if everything's ok, you'll be able to see the results in
generatedsubdirectory
The patch for react-native-codegen has been added as those were the changes that made this code work in a real project. Feel free to remove it so you can see the code generated by the original codegen tool!
AFAIK the codegen tool isn't official yet, this repository is for people who'd like to try JSI/codegen functionalities, even if a single person finds somthing that will help them, it was worth it!
This is a draft README and it's going to be improved probably, feel free to post PRs or issues, any suggestions are golden ✌️