view page source not displaying contents in reactjs

Viewed 356

I developed react js dynamic website. Now i am checking my website content of view page source not displayed my all content. only displayed default react index.html content only attached my view page source screenshot. but these two website (https://reactjs.org/ and https://www.netflix.com/in/) view page source working well. what I do my website. could you please solve issues.

enter image description here

1 Answers

React is rendered on the client using JavaScript (virtual DOM) to handle the real DOM and place the HTML elements in the browser.

This is why you will see a single DIV (root) react uses to mount your whole app on.

If you want to send to the client HTML files already rendered on the server-side you'll have to use an SSR framework like Next.js, which Netflix for example uses itself.

Related