What is better to use in JSX?

Hello, I recently started learning React and I’m wondering what is better to use in JSX, a function or a class. I will be glad if you answer and explain why it is better.

Functional components.

It used to be that there were tangible differences between class and function-based components, but in more recent versions of React, functional components are preferred. This article goes into a bit more detail:

React component guide: Class vs functional

1 Like

thanks