March 7, 2021

WeAnswer

The complete guide to the beginners as well as to the experienced Web Developers

Deep Dive in JSX – ReactJS

In ReactJS we can’t use double tag return in components like.

It gives an error because we return double tag

We can use like

It works due to  return single tag

In HTML we do not have a complete single tag like input, in ReactJS we must have complete tag
Ex.
HTML

ReactJS

 

 

In HTML apply CSS we are using class but in ReactJS must use className

Ex.
HTML

ReactJS

 

If you want to execute javascript in tag use {}

Ex

The method call in ReactJS


constructor use in ReactJS