Explain the role of reducer?
Answer / Sachin Rastogi
A Reducer in React.js is a pure function that takes the current state and an action, and returns a new state based on the provided action. It plays a vital role in managing application's state when using Redux or Context API.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are controlled components?
Explain lifecycle of a react component?
List down the components of redux?
What is a state in react?
Name two types of React component?
What is the significance of keys in react?
What is function based component?
Is setState() is async? Why is setState() in React Async instead of Sync?
List down some of the methods in a react-dom package
What are components in reactjs? Explain the component lifecycle with the help of a diagram explaining each component method in detail. Also, give an example of both stateless and stateful components with source code?
State the main difference between Pros and State?
What do you understand by virtual dom? Explain its working.