UNPKG

rooks

Version:

Essential React custom hooks ⚓ to super charge your components!

18 lines 573 B
declare type SelectHandler<T> = { index: number; item: T; setIndex: (newIndex: number) => void; setItem: (newItem: T) => void; }; /** * useSelect hook * Helps easily select a value from a list of values * * @param list List of values to select a value from * @param {number} initialIndex Initial index which is selected * @returns handler * @see https://react-hooks.org/docs/useSelect */ declare function useSelect<T>(list: T[], initialIndex?: number): SelectHandler<T>; export { useSelect }; //# sourceMappingURL=useSelect.d.ts.map