hydrogen
hydrogen copied to clipboard
[POC] urql for CartProvider
Description
urql is a lightweight graphql client for state management. https://formidable.com/open-source/urql/
This could replace our manual context updates and our reducer
This could:
- replace our manual context updates
- facilitate optimistic updates
- ~7.1kb + 6.5kb when adding the normalization. Tree shakable and both libs reuse core, so end is less.
- Compatible with svelte, and vue,
More comparisons: https://formidable.com/open-source/urql/docs/comparison/
Questions still pending:
- Works with SSR although I have not implemented