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)

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay