FocusRelayProvider
Makes a focus relay the focus parent of its children
Available since @roku-sdk/navigation 2.19.0
import { FocusRelayProvider } from "@roku-sdk/navigation/focus-relay";FocusRelayProvider(props: IFocusRelayProviderProps): JSX.ElementDescription
Makes a focus relay the focus parent of its children.
useFocusable and nested FocusBoundary instances inside it register with the relay rather than with the boundary that rendered them, so they follow the relay when it is rebound.
Parameters
| Name | Type | Description |
|---|---|---|
props | IFocusRelayProviderProps | The relay and the subtree it serves. |
Example
<FocusRelayProvider relay={relay}>
<Cell />
</FocusRelayProvider>Types
IFocusRelayProviderProps
Props for FocusRelayProvider.
| Name | Type | Description |
|---|---|---|
children? | Element | The subtree whose focusables and boundaries follow the relay. |
relay | FocusRelay | The relay that focusables in children register with, from createFocusRelay. |
Updated about 7 hours ago
What’s Next
Did this page help you?