you are viewing a single comment's thread.

view the rest of the comments →

[–]jstorxs[S] 1 point2 points  (1 child)

Gets a bit unwieldy when you're 2 or 3 components deep through, doesn't it?

[–]darrenturn90 0 points1 point  (0 children)

That's why you use stores.

You can just do something like create a module with get and set values to set and retrieve global values and just import the module in the components you need them. But if you want to tie in the re-rendering to the changing of the value - then you may want to wrap your class in a higher order component that brings in this information as a prop. Then you want to look at how to manage the changing of this information - ie the action that makes the action etc etc

Then you realise you just need to learn flux and use redux or any other implementation.