@wouterds/react-native-tv-focus
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

@wouterds/react-native-tv-focus

A package to programatically focus views on tvOS & AndroidTV.

Installation

# yarn
yarn add @wouterds/react-native-tv-focus

# npm
npm install @wouterds/react-native-tv-focus

Usage

import { findNodeHandle } from 'react-native';
import { focus } from '@wouterds/react-native-tv-focus';

// ...

// get tag by ref from a UI element
const tag = findNodeHandle(ref.current);

// programatically force focus on tag
focus(tag);

/@wouterds/react-native-tv-focus/

    Package Sidebar

    Install

    npm i @wouterds/react-native-tv-focus

    Weekly Downloads

    23

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    27.7 kB

    Total Files

    20

    Last publish

    Collaborators

    • wouterds