UNPKG

@commercelayer/react-components

Version:
13 lines (12 loc) 621 B
import type { CommerceLayerClient } from '@commercelayer/sdk'; interface ReturnProps { /** This is the access token used to initialize the sdk client. It need to be set as prop in the main `<CommerceLayer>` component */ accessToken?: string; /** This method can be used to initialize an sdk client and perform list, retrieve, update or delete operations on any resource */ sdkClient: () => CommerceLayerClient | undefined; } /** * React Hook that provides access to the official Commerce Layer SDK JS Client. **/ export declare function useCommerceLayer(): ReturnProps; export default useCommerceLayer;