30.
What is the purpose of the mapStateToProps method in React-Redux?
It connects a React component to the Redux store
It retrieves the current state of the Redux store
It dispatches actions to update the Redux store
It maps the Redux store state to the props of a React component
Correct: D
The mapStateToProps method is used to map the state from the Redux store to props that are passed to a React component. By connecting a component to the store using mapStateToProps, the component can access the state values it needs from the store and use them as props. This enables the component to react to changes in the Redux store's state.