hydrogen icon indicating copy to clipboard operation
hydrogen copied to clipboard

[POC] urql for CartProvider

Open lordofthecactus opened this issue 3 years ago • 0 comments

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

lordofthecactus avatar Aug 05 '22 12:08 lordofthecactus