Does having react16.7 hooks, mean that you don't have to use class components?

does having react16.7 hooks, mean that you can use functional components instead of class components?

Nov.01,2021

redux is still necessary for project engineering.

hooks did three things

  • simplify state
  • simplify lifecycle
  • provide a custom method Hook.

these are only for React's Component , but have no effect on the React project.

before that, when your project engineering was good enough, code like extends React.Component was rare, and relatively more was SFC .
so just from the point of view of whether or not to use class , hooks is still not very useful from an engineering point of view.

but for React Component itself, it means a lot. Especially useEffect .


Yes. But Dan said that because of backward compatibility, he didn't want people to go to the trouble of rewriting the project, and Class wouldn't abandon it.


Yes. You don't have to write class, even react redux. React hooks is so important that I don't know how to describe it.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e48aea-44cd1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e48aea-44cd1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?