1.

Method to create components in ReactJS and its ways and its syntax?

Answer»

Method to create components in ReactJS and its ways and its syntax?
There are mainly two possible ways to create ReactJS components.
(1)FUNCTIONAL Components:-It is the most SIMPLEST WAY to create components in ReactJS. And this will accepts props as an OBJECT and this will returns ReactsJS elements. These are pure Javascript functions.


Functional Components
(2)Class Components:-Here we can use ES6 class to DEFINE component. And below is the code for the same.


Class Components



Discussion

No Comment Found