In this article I’m going to show you the differences between functional components and class components in react.

There are mainly two components in React:

  • Functional Components
  • Class Components

So before anything let’s understand what is Component?

Component is a base building block of any react application.It is a JavaScript class or maybe a function which accepts inputs(properties or Props) and return React elements that shows how the User Interface need to be visible.

You can go through this to know more about components and props.

When we describe a component using functional component it is like this,. function Welcome(props)…

Sohit-UI expert

I am a frontend developer who love to learn and share.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store