So I am trying to run some react code (simple search bar code) from my terminal. I put my source code within the App.jsx, the default made by "npx create-react-app", however, anytime I run npm start, I only get the default React page telling me to "edit App.js and reload". I ran my code within the sandbox environment within the react website and it was working fine. I am not entirely sure what I am doing wrong here. Any suggestions?
Question posted in Javascript
A very good W3school tutorial can be found here.
A very good W3school tutorial can be found here.
2
Answers
npm run start
is the script to start the production app.After you do the changes, type
npm run build
to create the build with that changes, than runnpm run start
.For development you can use
npm run dev
and all the changes are automatically reloaded when saved.npm install or npm i is do the project insatll,and run the project npm run dev