in React JS by
Q:

What are the differences between a class component and functional component?

1 Answer

0 votes
by

Class components allows us to use additional features such as local state and lifecycle hooks. Also, to enable our component to have direct access to our store and thus holds state.

When our component just receives props and renders them to the page, this is a ‘stateless component’, for which a pure function can be used. These are also called dumb components or presentational components.

Click here to read more about React JS
Click here to read more about Insurance

Related questions

0 votes
asked Dec 8, 2020 in React JS by SakshiSharma
0 votes
asked Jul 2, 2019 in React JS by Venkatshastri
0 votes
asked Jun 19, 2020 in React JS by JackTerrance
0 votes
asked Jul 2, 2019 in React JS by Venkatshastri
0 votes
asked Nov 26, 2019 in React JS by AdilsonLima
...