DEV Community

Discussion on: I built my app in React, React Native and NextJS. Lessons learned.

Collapse
 
gandreini profile image
Giulio Andreini

How did you manage the repositories? Are there common parts in the ReactJS, React Native and NextJS repos? Or just separate repos?
Thanks!

Collapse
 
ash_grover profile image
Ash G • Edited

They all are in separate repos. Architecture for both React and React Native code is similar but the code is different. Also, React Native has some quirks which I have to careful with, so managing each repo separately was the way to go for me.

NextJS is completely different as I used it for the website only, so its in separate repo.

Collapse
 
gandreini profile image
Giulio Andreini

Thanks for the answer! Are you aware if there could be a way to share some parts of the repos to avoid duplicating code? I imagine that some parts of the code (utilities and helpers, fetch from API...) must be similar on all the repos.

Thread Thread
 
ash_grover profile image
Ash G

I'm sure there could be code which I could refactor and share between both projects. However, I wanted to get the app out there in the hands of users as soon as possible. The architecture at the moment is similar so its manageable and since I have to be careful on the React Native side, it works for me this way.

Thread Thread
 
gandreini profile image
Giulio Andreini

Thanks for the answer!