0

My structure looks like below. I need to read props of component1 from component5. How to make it? Thanks.

Component 1  

  |- Component 2

    |- Component 4

      |- Component 5
susanne
  • 1,219
  • 3
  • 17
  • 26
  • Does this answer your question? [How to pass information to nested components in react?](https://stackoverflow.com/questions/48157223/how-to-pass-information-to-nested-components-in-react) – akhtarvahid Dec 02 '19 at 03:15

2 Answers2

1

You can use context in react or redux

Context: https://reactjs.org/docs/context.html

And redux library: https://redux.js.org/

san
  • 1,225
  • 10
  • 17
1

You have two main options here:

And the difference as per requirement you can choose Context or Redux to use

akhtarvahid
  • 8,226
  • 2
  • 18
  • 27