SDK Reference
This page's documentation only applies to Chord's Next.js starter prior to the release of the React. The Next.js starter now uses the React SDK and does not use the methods documented on this page. Check out the React SDK Reference for complete documentation, and the React SDK Migration Guidefor details on how to upgrade.
The Next.js starter kit includes a set of React hooks that offer an easy way to interact with Chord's order management system for common operations like adding items to a cart. These hooks provide access to SDK methods that handle communication with Chord's order management system and keep the site's Redux state up to date. They also automatically send tracking events to Segment.
Hook | Description |
Provides support for sending UI-related tracking events to Segment. | |
useAuth | Provides support for user authentication. Chord supports passwordless authentication with Magic. |
useCart | Returns the current shopping cart, and functions for creating and interacting with the shopping cart. |
Provides support for interacting with products. | |
Provides support for managing user subscriptions. | |
Returns the current user's subscriptions. | |
Provides support for Square checkout. | |
Provides support for internationalization | |
useUser | Returns the current user, and functions for loading data about the user. |