preact-spatial-navigation
Version:
A powerful Preact library for TV-style spatial navigation with LRUD algorithm, virtualized lists/grids, and smart TV support
26 lines • 915 B
TypeScript
import type { FocusableConfig, UseFocusableReturn } from '../types';
/**
* @deprecated This hook is deprecated and no longer functional after migrating to @bam.tech/lrud.
* Please use the new SpatialNavigationNode component with render props pattern instead.
*
* Migration example:
* ```tsx
* // Old API:
* const { ref, focused } = useFocusable({ onEnterPress: handleSelect });
* return <div ref={ref} className={focused ? 'focused' : ''}>Item</div>;
*
* // New API:
* return (
* <SpatialNavigationNode isFocusable onSelect={handleSelect}>
* {({ isFocused }) => (
* <div className={isFocused ? 'focused' : ''}>Item</div>
* )}
* </SpatialNavigationNode>
* );
* ```
*
* @param config - Configuration (no longer used)
* @returns Stub return object
*/
export declare function useFocusable(_config?: FocusableConfig): UseFocusableReturn;
//# sourceMappingURL=useFocusable.d.ts.map