useNavigation - Toolpad CoreSkip to content Search… Toolpad Core v0.16.0IntroductionIntegrationsComponentsAll componentsProviderApp ProviderLayoutDashboard LayoutPage ContainerAuthenticationSign-in PageAccountDataCRUDUtilsuseDialogsuseNotificationsuseSessionuseNavigationPersisted stateAPIs
+
useNavigation useSessionPersisted state
Toolpad Core exposes an API to access the current navigation definition.
UsageWhen a navigation is set in Toolpad Core, a NavigationContext is used to share navigation information among all Toolpad Core components, with the value from the navigation prop of the AppProvider:
AppProvider navigation={navigation}>{props.children}AppProvider>
CopyCopied(or $keyC)
You can access the current value of the NavigationContext by invoking the hook inside your components:
import { useNavigation } from '@toolpad/core/useNavigation';
function MyComponent() {
// ...
const navigation = useNavigation();
// ...
}
CopyCopied(or $keyC)
Hook API
useNavigation()
Edit this pageWas this page helpful?
•
Blog•
StoreContents
UsageHook APIBecome a Diamond sponsorMUI stands in solidarity with Ukraine.useNavigation - Toolpad Core,AI智能索引,全网链接索引,智能导航,网页索引
- Toolpad Core exposes an API to access the current navigation definition.