0

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 ?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

4 Comments

If the other component is nested inside the component with user in local state, then you can pass it down as a prop.
It is not nested inside, I must use redux but I don't know how , please can you explain with an sample example ?
Have you gone through the documentation available at redux.js.org/docs/introduction
Yes I did this but I don't arrive to do any small example .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.