John
John

Reputation: 103

How use state in component reactjs by react-redux?

I have an react component and inside it I have state called "user" with some data, I need this state in other component . please how do this with redux ?

Upvotes: 0

Views: 48

Answers (1)

chautelly
chautelly

Reputation: 467

If user is part of the component's local state, and the other component is not nested inside it, then you need to move that piece of information out of local state and into Redux's store state.

Upvotes: 1

Related Questions