Skip to content
Advertisement

Why are showing blank page in reactjs?

I am using class and constructor in react-js but this program does not error is thrown in console. show a message only blank. what is wrong?

JavaScript

Advertisement

Answer

You need to pass it as <Component />. And Still doesn’t work then add your index.html, there might be the issue then.

JavaScript

PS: If you want to render only element only html element then you can do as you did and same is mentioned in docs. And you should return element from Component [Ref].

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement