DEV Community

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

Collapse
 
johnfrommartin profile image
Info Comment hidden by post author - thread only visible in this permalink
johnfrommartin

Unless you’re stuck in React <16.8, this is outdated information.

As Kishan mentioned, Functional Components now have state via Hooks. React recommends that Functional Components are used over classes, and even will throw warnings about a few Class Component lifecycle methods that are being deprecated.

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