Thanks. With the addition of React Hooks, there is now no difference between class components and functional components.
You can do everything in the functional component that the class components offered.
The only difference between them is that there are no available hooks for getSnapshotBeforeUpdate, getDerivedStateFromError and componentDidCatch lifecycle method of class components.
So If you need to use these lifecycle methods, you need to use class components instead of functional components
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks. With the addition of React Hooks, there is now no difference between class components and functional components.
You can do everything in the functional component that the class components offered.
The only difference between them is that there are no available hooks for getSnapshotBeforeUpdate, getDerivedStateFromError and componentDidCatch lifecycle method of class components.
So If you need to use these lifecycle methods, you need to use class components instead of functional components