DEV Community

Ajay Baraiya
Ajay Baraiya

Posted on

How React serves?

When you do.

npm start
Enter fullscreen mode Exit fullscreen mode

index.html will be served in web browser.

Now, index.html contains root dom node and as it served the control goes to it's javascript file which is index.js.

Now, the index.js having below rander function.

ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
);
Enter fullscreen mode Exit fullscreen mode

As you can see above <App /> is rendered.

Now, <App /> component exported from App.js file.

So, this how we do changes in App.js and it reflects on web browser.

Top comments (0)