@ninetailed/experience.js-react
Version:
Ninetailed SDK for React
18 lines (17 loc) • 700 B
TypeScript
import { ProfileState } from '@ninetailed/experience.js';
type UseProfileHookResult = Omit<ProfileState, 'experiences'> & {
loading: boolean;
};
/**
* Custom hook that provides access to the Ninetailed profile state
* with the 'experiences' property removed to prevent unnecessary re-renders.
*
* This hook handles profile state changes efficiently by:
* 1. Only updating state when actual changes occur
* 2. Removing the large 'experiences' object from the state
* 3. Properly cleaning up subscriptions when components unmount
*
* @returns The profile state without the 'experiences' property
*/
export declare const useProfile: () => UseProfileHookResult;
export {};