Add class components introduction

pull/1464/head
Kamran Ahmed 2 years ago
parent 02185886f5
commit 40a447e6d3
  1. 11
      content/roadmaps/103-react/content/100-react-fundamental-topics/102-components/101-class-components.md

@ -1 +1,10 @@
# Class components # Class Components
Components can either be created using the class based approach or a functional approach. These components are simple classes (made up of multiple functions that add functionality to the application). All class based components are child classes for the Component class of ReactJS.
Although the class components are supported in React, it is encouraged to write functional components and make use of hooks in modern React applications.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='blue' badgeText='Official Docs' href='https://reactjs.org/docs/components-and-props.html#function-and-class-components'>Components and Props</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://medium.com/geekculture/is-there-any-reason-to-still-use-react-class-components-9b6a1e6aa9ef'>Is There Any Reason to Still Use React Class Components?</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.freecodecamp.org/news/functional-components-vs-class-components-in-react'>Functional Components vs Class Components in React</BadgeLink>

Loading…
Cancel
Save