Description
I've been prototyping using Redux for managing Gatsby's internal server/cli state to replace the somewhat ad-hoc data management code.
I needed to refactor this code anyways to get data hot reloading working (#1 requested feature for people experimenting with Gatsby v1) and figured I'd try this out.
I'm about 1/2 way through ripping out the old code and replacing it with Redux but I've very positive about the direction. The data flows are much simpler, much more testable, and it's suggesting very positive changes to a few Gatsby APIs.
And the nice thing about Redux is since the community is huge, like with GraphQL, we'll get freebies by adopting Redux.
E.g. built-in devtools support.
This screenshot is the Redux devtools looking at an action from my Gatsby blog where I opened a markdown file, made a small change, and saved it and this is the resulting state diff.
In addition to the nice code improvements plus our now built-in supercharged debugger, using Redux will make Gatsby's code base feel very approachable to many of its users who will have experience using Redux on client-side apps.