DEV Community

loading...

Discussion on: When to use Class Component and Functional Component??

Collapse
koolkishan profile image
Kishan Sheth

Your Article was great. But after the React version 16.8 we can use state in Functional Components also, so there is no need to use the class components. In version 16.8 Hooks were introduced and with the use of useState hook we can use the state in functional components also. It is advised that you use Functional components rather than class components by Facebook itself.

Read more about hooks from official documentation.
reactjs.org/docs/hooks-intro.html

Follow my YouTube Channel for amazing Web Development Tutorials.
youtube.com/channel/UCDT8sIFy3pW8L...

Some comments have been hidden by the post's author - find out more