0
votes

I am a beginner to React and I am trying to build simple apps by following tutorials to get familiar with React. However, it always bugs me that I have to download the node_modules every time I create a new react app using

create-react-app 

Is there a way to either,

  1. Opt out of auto-downloading node_modules when creating a new app using create-react-app, and after the app's basic files have been initiated by create-react-app process, then copy the node_modules directory into the react app's directory

or

  1. Create a new directory which has same name as the app, copy the node_modules directory into that directory, then run create-react-app command(This one seems less possible)

I am still trying to understand the file structure of React and I often misplace files, therefore I often have to start afresh. I am on a metered internet connection therefore I cannot afford to download the same set of files every time I start a new app. I do understand that not all the modules are downloaded when creating an app and I am talking about the mandatory packages that I have to download again and again.

2

2 Answers

0
votes

You can install modules from the cache. Please, refer to this post for more detailed information.

0
votes

You can use tools like Codesandbox for learning purposes. Basic react template is provided over there and you can add additional libraries with a single click.