useThirstie composable
The library contains a vuejs composable function, useThirstie which uses the ThirstieClient library to manage Thirstie API interactions, e-commerce user state, and local storage in order to controll all aspects of the e-commerce session.
Session state is managed by Thirstie's backend and the useThirstie composable manages session tokens to ensure a consistent user experience -- for example persisting a session if the user closes and reopens the browser tab.
The useThirstie composable also manages branding configuration settings, so that components can use the appropriate brand colors, logo, etc.
You generally won't need to interact with useThirstie directly. It is initialized by initApp with your site configuration.
useThirstie()
Parameters
No parameters
Returns
| Object | type | description |
|---|---|---|
| thirstieClient | object | ThirstieClient instance |
| brandStyle | object | Theme values, e.g. primary & secondary colors, logo, etc. |
| stripeGateway | object | Stripe.js object for payments |
| routes | object | Custom routes (optional) |
| brandContent | object | Support email, other custom global content |
| setLocalStorageSessionState | method | Used by components to set local storage |