OnLinkNavigationProvider
Deprecated

OnLinkNavigationProvider is a React context provider to externally control the link behavior of components further down the tree.

OnLinkNavigationProvider is soon to be deprecated, use GlobalEventsHandlerProvider's `linkHandlers.onNavigation` instead. View GlobalEventsHandlerProvider

Props

Component props
Name
Type
Default
children
Required
React.Node
-

Context lets a parent component provide data to the entire tree below it. Only components within the OnLinkNavigationProvider tree will be able to subscribe to it.

onNavigation
({|
  href: string,
  target?: null | "self" | "blank",
|}) => ?({|
  +event: SyntheticEvent<>,
|}) => void
-

If passed, it replaces the default link behavior with custom on navigation behavior. See custom navigation context variant for examples.