useFocusRelayTarget

Returns a handle to the nearest enclosing FocusBoundary that focus relays can bind to

Available since @roku-sdk/navigation 2.19.0

import { useFocusRelayTarget } from "@roku-sdk/navigation/focus-relay";
useFocusRelayTarget(): FocusRelayTarget | null

Description

Returns a handle to the nearest enclosing FocusBoundary that focus relays can bind to.

Call it during component setup, under the boundary you want the relay to target.

Return values

A handle to the enclosing boundary, or null when the caller is not inside a FocusBoundary.


What’s Next

Did this page help you?