reactioncommerce / reaction

Mailchimp Open Commerce is an API-first, headless commerce platform built using Node.js, React, GraphQL. Deployed via Docker and Kubernetes.
https://mailchimp.com/developer/open-commerce/
GNU General Public License v3.0
12.3k stars 2.17k forks source link

Choose a frontend-state management system for the GraphQL components #3904

Closed spencern closed 6 years ago

spencern commented 6 years ago

Summary We need to choose a front-end state management system for using with GraphQL.

Acceptance Criteria The solution will select a state management system that is ideal for Reaction's codebase going forward and lay out a case for why it's the right solution for our needs. Options that were not selected, but were evaluated will be noted along with why the selected solution was a better fit. Any trade-offs that are being made should be noted as well.

aldeed commented 6 years ago

@spencern @nnnnat @willopez @kieckhafer @mikemurray

I looked a bit at the latest releases of these packages, and it looks like neither Relay nor Apollo require Redux anymore. So I think this is more like 2 separate decisions:

  1. What to use for atomic reactive UI state? Redux or MobX (or something else)
  2. What to use for cached data state? Relay or Apollo Client

I personally want to try these combinations within Meteor before making the decision because I've used them all but never in a Meteor app. If you can find time, I think it would be good for several of us to independently do this exercise to be able to make a good decision here.

This is probably the best Relay vs Apollo article, but Relay has changed since it was written, so playing with latest example apps of both will be best way to judge what you like best: https://blog.graph.cool/relay-vs-apollo-comparing-graphql-clients-for-react-apps-b40af58c1534

jacobpdq commented 6 years ago

Perhaps https://github.com/vulcanjs/vulcan/ will help integrate should you choose to use Apollo.x