useNavigation

useNavigation(
	options?: NavigationOptions,
	deps?: any[]): INavNodeInfo[] | null | undefined;

Returns web navigation nodes. Use NavigationOptions.type property to change navigation type. Default is topNavigation.

Examples

Get top navigation nodes,

const topNav = useNavigation();

// Explicit type
const topNav = useNavigation({
	type: "topNavigation"
});

Get quick launch navigation nodes,

const quickLaunch = useNavigation({
	type: "quickLaunch"
});

Parameters

NameTypeDescriptionTracked for changes
options?NavigationOptionsuseNavigation hook optionsPartially
deps?DependencyListHook dependency list.Yes