DEV Community

Discussion on: CAN I DUPLICATE A FRESH REACT APP FOR ANOTHER APP?

Collapse
 
codemochi profile image
Code Mochi

Yes you can definitely do this- you'll find that the node_modules folder is the largest piece of this. Just to be safe if the packages are similar, you can copy it and then do an npm install in the folder and you should fetch any packages that changed or you didn't have for whatever reason.

Collapse
 
stuartmuyambi profile image
Stuart Muyambi

Wouldn't it affect the perfomace of the new app?

Collapse
 
codemochi profile image
Code Mochi

No it shouldn’t matter. Yarn is a competitor to npm and it will actually cache your packages which is essentially the same idea you are doing here. With that said, just because you can do this, if it gives you problems just do an npm install to make sure you package versions are all good.

Collapse
 
nachodev profile image
Fortune Nacho

Please can you explain how it can be done?