rooks
Version:
Essential React custom hooks ⚓ to super charge your components!
21 lines • 592 B
TypeScript
/**
* useStackState
* @description Manages a stack with react hooks.
* @param initialList Initial value of the list
* @returns The list and controls to modify the stack
* @see https://react-hooks.org/docs/useStackState
*/
declare function useStackState<T>(initialList: T[]): [
T[],
{
clear: () => void;
isEmpty: () => boolean;
length: number;
peek: () => T | undefined;
pop: () => T | undefined;
push: (item: T) => number;
},
T[]
];
export { useStackState };
//# sourceMappingURL=useStackState.d.ts.map