Understanding React component

Understanding react Component we will learn about the component and its type and stateful and stateless bifurcation.

  • It is most important concept of react
  • There are two types of components functional and class
  • These two types of components are called stateless and stateful components

Understanding react Component

Understanding react Component

1.Functional components:

  • Functional Components are functions.
  • Functional component accepts props as an argument and return valid jsx

Functional components are called stateless component because it doesn’t have state and lifecycle methods

same functional component can be re written as

2.Class component:

  • It is more featured way of defining react components
  • It has private internal state
  • private internal states are reactive in nature as the state of the component change it re-render the page.







Leave a Reply

Your email address will not be published. Required fields are marked *