The useState() is a Hook that allows you to have state variables in functional components . so basically useState is the ability to encapsulate local state in a functional component. React has two types of components, one is class components which are ES6 classes that extend from React and the other is functional components. Class components a Component and can have state and lifecycle methods: class Message extends React. The useState hook is a special function that takes the initial state as an argument and returns an array of two entries. UseState encapsulate only singular value from the state, for multiple state need to have useState calls.
🔥 In this series we will cover all most important topics which you must know for project development.
Recommended Videos:
⏩ Build Personal Portfolio Website - • Build & Deploy Fully F...
⏩ Build & Deploy RU-vid Clone - • Build & Deploy Fully F...
⏩ Build & Google Search Clone - • Build & Deploy Google ...
Follow me on 👇
🖼️ Instagram - bit.ly/3jIJqYc
😺 GitHub - bit.ly/3I6Qx6O
6 сен 2024