In functional components, to manage local state you can use the ________ hook.
- useContext
- useEffect
- useRef
- useState
In functional components in React, you can manage local state using the useState hook. This hook allows you to add state variables to your functional components, providing a way to manage and update component-specific data without using class components and this.state.
Loading...
Related Quiz
- Which method in Next.js is specifically used to fetch data on the server side before rendering?
- To comment out multiple lines in JSX, you'd use ________.
- What is the use of the ownProps parameter in mapStateToProps() and mapDispatchToProps()?
- What is the primary purpose of error boundaries in React?
- How can you pass state data to the route in React Router while navigating?