For global state management in a React application, one can use the ________ API.
- Component
- Context
- Render
- State
In React, the "Context" API is used for global state management. It allows you to pass data (state) through the component tree without having to pass props manually at each level. Context provides a way to share data between components at different levels of the hierarchy, making it suitable for global state management in React applications.
Loading...
Related Quiz
- Consider a scenario where you want to share logic between multiple components without adding extra layers in the component tree. Which pattern would best fit this requirement?
- How can you ensure a functional component re-renders only when certain props change?
- What is the primary difference between getServerSideProps and getStaticProps in Next.js?
- What is Virtual DOM?
- How to make AJAX request in Redux?