O3 Framework / useLeftNavStore
useLeftNavStore():
LeftNavStore
Defined in: packages/framework/esm-react-utils/src/useLeftNavStore.ts:20
A React hook that provides access to the left navigation store state. The component will re-render whenever the left navigation state changes.
The current state of the left navigation store.
import { useLeftNavStore } from '@openmrs/esm-framework';
function MyComponent() {
const leftNavState = useLeftNavStore();
return <div>Current nav: {leftNavState.activeNavName}</div>;
}