@commercelayer/react-components
Version:
The Official Commerce Layer React Components
13 lines (12 loc) • 621 B
TypeScript
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;