I am beginner learning React. I am having a problem when I delete all the boilerplate files except index.js in order to start from scratch.
I create my first “hello world” component and then start the dev server. The browser opens up and shows my component but when I change “hello world” to “hello people” the component displayed in browser is still “hello world” and I have to refresh the browser to show “hello people”.
I spent 2 days browsing through internet to find a solution but yet, I can’t find one. As per the solutions in stackoverflow, They didn’t work for me either.
If what I suspected is the case, it would be janky to work around, because CRA is not made for tweaking. The easiest thing you can do is re-create App.js and work in there the way it was made. (It does not necessarily need to be named App.js, it must just not be named index.js)
Is there a particular reason you wanted to delete it?
Alternatively, you can learn how to create a React app from scratch, using Webpack to build and watch the files, and Babel to transpile the React to JavaScript. there are plenty of YouTube tutorials out there on how to do this, and if you plan to create more complex apps, it would be beneficial to learn
However, I believe the error is related to the build package (which is not pushed to GitHub, and should not be pushed). That is, when CRA builds your app (when viewing), it should create a manifest. The error sounds like something has gone wrong with the build.