Live data from Hacker News

Where to Put State?

twitter.com

1–2 of 2 posts

Re: Where to Put State?

#2
Those programmes where I put state in one place dedicated to managing state (e.g. Redux) were much more easier to reason about then those where I put state everywhere, anywhere somewhere (Parent? Current component? Context provider? Apollo? Redux?)

Man, that should be that simple: Everything is from above.

Is it gonna change? Then it's a state. Put it in a state manager and pass it from top to bottom.

Every other solution is a workaround.