What is the best folder structure to build two twin apps with React Native?

Viewed 2623

I need to create two twin apps with React Native and both apps will be 90% the same they will use some shared components and the styles will be different.

the question is : should i create one react native project and from there to building two apps

and the folder structure will be :

  • ReactProject
    • shared
    • project1
      • components
    • project2
      • components
  • index.ios.js
  • index.android.js

and when I want to build one of the apps I will need to change the main component.

or should I create to different React Native projects

and the folder structure will be :

  • shared
  • ReactProject1
    • components
    • index.ios.js
    • index.android.js
  • ReactProject2
    • components
    • index.ios.js
    • index.android.js

I would like to know what is the right approach to do this kind of project

thanks !

1 Answers
Related