Ad

Shows Blank Source Code In React?

- 1 answer

I am creating a mern stack application and ı have problems as shown in the pictures

Here is what shows when ı press ctrl + U in chrome

enter image description here

Here is what shows in dev tools enter image description here

My app is still in development mode and is this affects seo ? and how can ı render in source code what shows in dev tools ? Thanks

Ad

Answer

That happens because a ReactJS is rendered using JS. It means that the DOM will be updated using JS. When you open it with ctrl + U you're looking only to the HTML document, without any changes made by the JS engine.

I don't think leaving it like this will affect SEO, but you you can use server-side rendering to achieve what you want.

Ad
source: stackoverflow.com
Ad