---
title: SDK Reference
slug: oms/W65O-sdk-reference
docTags: 
createdAt: 2022-11-08T14:21:27.000Z
---

The Chord client-side Javascript SDK is installed as a Gatsby theme. It's available as an npm package, `@chordcommerce/gatsby-theme-performance`, via GitHub Packages.

Despite the name, this package does not provide a visual theme. To quote from the [Gatsby documentation](https://www.gatsbyjs.com/docs/themes/what-are-gatsby-themes/):

:::BlockQuote
Gatsby themes are plugins that include a `gatsby-config.js` file and add pre-configured functionality, data sourcing, and/or UI code to Gatsby sites. You can think of Gatsby themes as separate Gatsby sites that can be put together and allow you to split up a larger Gatsby project!
:::

The `gatsby-theme-performance` theme includes the Chord SDK, a set of methods you can import and use in your React components to do things like add items to a cart and check out. The theme also pre-configures your Gatsby site with a number of useful commerce features like product feeds and internationalization support.

The Chord SDK is available to use in your React components via React hooks:&#x20;

| Hook                                                   | Description                                                                                           |
| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| [useAnalytics](docId\:n6GxgptHdTzcer80sn-zM)           | Provides support for  sending UI-related tracking events to Segment.                                  |
| [](useauth.md)[useAuth](docId\:S8mmLbW6nSRd6QM-1WnBn)  | Provides support for user authentication with a Shopify customer account.                             |
| [useCart](docId\:txA_mzjahLfdAxB0JoePy)                | Returns the current shopping cart, and functions for creating and interacting with the shopping cart. |
| [useUser](docId:_UJJT7bCF7JCuEbvNvIeJ) [](useuser.md)  | Returns the current user, and functions for loading data about the user.                              |

