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
susanna
  • 1,395
  • 3
  • 20
  • 32
  • 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,515
  • 11
  • 18
1

You have two main options here:

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

akhtarvahid
  • 9,445
  • 2
  • 26
  • 29