React Hooks vs Class Component
source link: https://blog.geekyants.com/react-hooks-vs-class-component-f13ec94505f8
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
React Hooks vs Class Component
With hooks being introduced, how powerful is it compared to Class components?
Before the React 16.8 Hooks update in 2018, state only belonged to Class components and were therefore Stateful, while functional components were plain Javascript functions and couldn’t use state. Since functional components were just for presentation purposes i.e. to present something to the DOM, they were also called Presentational or Dumb Components.
…and then the hooks update was released. Looks like someone wasn’t supposed to stay dumb forever :-)
This article will talk about the key differences between how these two manage states.
Read the complete article here: https://geekyants.com/blog/react-hooks-vs-class-component
Ritu Saxena is a software engineering trainee and has tried her hand at a technical article for the first time. Leave some 👏🏻 and love for her so that she does this more often.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK