Skip to content
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
This repository was archived by the owner on Nov 20, 2023. It is now read-only.

react-js-buy example: checkout.totalTax and checkout.totalPrice do not exist on type 'Cart' #122

@princefishthrower

Description

@princefishthrower

In the react-js-buy example (https://github.com/Shopify/storefront-api-examples/tree/master/react-js-buy), in component Cart (https://github.com/Shopify/storefront-api-examples/blob/master/react-js-buy/src/components/Cart.js) there is usage of this.props.checkout.totalTax and this.props.checkout.totalPrice.

I've recently done a TypeScript implementation following the code in react-js-buy, but I notice in the typing of this.props.checkout, which is of ShopifyBuy.Cart type, that totalTax and totalPrice are no longer there. (Only subtotalPrice remains.)

I also don't find totalTax and totalPrice anywhere in the Shopify Buy SDK docs either (https://shopify.github.io/js-buy-sdk/)

I'm wondering if the patterns in react-js-buy are altogether deprecated, or not the best way of connecting to the Shopify API anymore - I notice this example hasn't been updated in a year, while others example folders like the react-apollo, react-graphql-client, and react-hooks-apollo have been updated within the last few months.

Any pointers or explanation would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions