In React, ___________ is used to manage component-level state.
- Redux
- useState
- Context API
- Lifecycle Methods
useState is a React hook that allows functional components to manage state locally. It simplifies state management within a component without the need for class-based components or external libraries like Redux. The other options are also valid for state management, but useState is specifically designed for component-level state management and is a fundamental part of React's modern approach to state handling.
Loading...
Related Quiz
- What are JSON Web Tokens (JWT) and how are they used for authentication in web applications?
- During a sprint review, stakeholders request significant changes to the project scope. How would you handle this situation within the Agile framework?
- What is the time complexity of reversing a linked list iteratively and recursively?
- How does a priority queue differ from a regular queue?
- A ___________ is a data structure used to store information about the state of each thread in...