温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.mui.com/toolpad/core/react-use-navigation/
点击访问原文链接

useNavigation - Toolpad Core

useNavigation - Toolpad CoreSkip to contentSearch…

Toolpad Corev0.16.0IntroductionIntegrationsComponentsAll componentsProviderApp ProviderLayoutDashboard LayoutPage ContainerAuthenticationSign-in PageAccountDataCRUDUtilsuseDialogsuseNotificationsuseSessionuseNavigationPersisted stateAPIs + useNavigation

Toolpad Core exposes an API to access the current navigation definition.

Usage

When 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 page

Was this page helpful?

useSessionPersisted state

Blog

Store

Contents

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.