Skip to content

Having the useCart returns promises would improve my DX a lotΒ #1041

@pnodet

Description

@pnodet

hydrogen-react offers a lot of flexibility over the full hydrogen frameworks (id: building nextjs headless e-commerce)

As a team, we used to build headless e-commerce using Apollo GraphQL. The setup is a bit tedious (download the schema.graphql using rover, add codegen for types, create fragments...).

Migrating to hydrogen-react should improve those (less setup). But the migration needs a lot of refactoring as I find myself often wanting to await the GraphQL query, as I used to do before.

I'd love the useCart() to return promises instead, would that be something you would consider?

This was mentioned in a previous issue, without much decisions. #685

Would be willing to help,
Thanks.

Which package or tool is having this issue?

hydrogen-react

What version of that package or tool are you using?

2023.4.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions