FocusPathContext
Context that RootFocusBoundary provides when its setFocusPath prop is set, so that useFocusable can report which SceneGraph node holds virtual focus
Available since @roku-sdk/navigation 2.18.0
import { FocusPathContext } from "@roku-sdk/navigation";Also exported as FocusPathCtx from @roku-sdk/navigation (deprecated).
Deprecated: FocusPathCtx. Use FocusPathContext. Removed in the next major release.
const FocusPathContext: Context<IFocusPathContext | undefined>Description
Context that RootFocusBoundary provides when its setFocusPath prop is set, so that useFocusable can report which SceneGraph node holds virtual focus.
Apps don't normally read or provide this context themselves. Without a provider, focus-path tracking is off.
Types
IFocusPathContext
The value RootFocusBoundary provides through FocusPathContext when its setFocusPath prop is set.
| Name | Type | Description |
|---|---|---|
notifyFocus | (domNode: DomNode) => void | Notify the provider that this DomNode now holds virtual focus. |
rootNode | () => DomNode | null | The root DomNode rendered by the provider's wrapper <group>. |
Updated about 3 hours ago
What’s Next
Did this page help you?