Reputation: 4597
I just finished creating an android app in react-native (RN). I need to create another app now. A lot of code is same across both apps. I want to create the second app within the same project and reuse all the common components rather than duplicating them.
I went through this SO question and configure android build variants link. They talk about how to create a new module, gradle config and organization of java code in different source sets like src/demoDebug/, src/debug/, src/demo/ and src/main/.
I don't think this will work with react-native because the entry point of RN app is index.android.js. For 2 apps to work out of the same project we need 2 entry points. Is there a way to define multiple entry points in a RN android app? Does RN support this? If yes, how to organize files of the two apps in the same project?
Upvotes: 0
Views: 547