Stop using Class Components in React Switch to functional components with hooks instead Margarita Morozova. Hooks were introduced in React 16.8. In short, they let you use state and other React features without writing a class. UseState returns a pair: the current state value and a function that lets you update it. You can use as many useState hooks as you need.
Sort: