April 2020
Intermediate to advanced
716 pages
18h 55m
English
The last line of code in App.js, which exports the App component, uses the higher-order component (HOC) hot module from react-hot-loader to mark the root component as hot.
mern-skeleton/client/App.js:
import { hot } from 'react-hot-loader'const App = () => { ... }export default hot(module)(App)
Marking the App component as hot in this way essentially enables live reloading of our React components during development.
For our MERN applications, we won't have to change the main.js and App.js code all that much after this point, and we can continue building out the rest of the React app by injecting new components into the MainRouter component, which is what we'll do in the next section.
Read now
Unlock full access