It is always recommended to start your react journey using the create-react-app which can be found here. It saves a lot of time as all the basic application backend is provided after installation, and we are only left to deal with the implementation details. Whenever we make changes in the main core ‘app.js’ file inside the create-react-app, and visit the localhost then we see that the page refreshes itself after updating the content.
Now whenever we make any kind of change to our app.js file and save it, react will compile it and the changed content will be shown on the web. It will refresh the page every time we save it, though it recommended to make use of the HOT Module Replacement, which allows us to reload our application in the browser without refreshing the page. It improves the experience as a developer. In order to make use of this module, our code inside the ‘index.js’ will look something like the code below:
‘updated index.js file’
Now, the browser shouldn’t refresh though the content should be updated.
- ReactJS | Components - Set 2
- ReactJS | Fragments
- ReactJS | Using Babel
- ReactJS | Refs
- ReactJS | Components
- ReactJS | Props - Set 1
- ReactJS | Props - Set 2
- ReactJS | PropTypes
- ReactJS | ReactDOM
- ReactJS | Lists
- ReactJS | Keys
- ReactJS | Virtual DOM
- ReactJS | Introduction to JSX
- ReactJS | Lifecycle of Components
- ReactJS | Transition Group
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.