Shape gradient

Custom Hooks

Lumino provides a set of internal React hooks to help you extend the functionality of your documentation site without writing complex state management.

Core Hooks

The core functionality of this module relies on the distributed nature of the Lumino backend. It is designed for high availability and low latency access.
useSearch
Provides access to the global search state and filtered results.
Custom Hooks Shape
useNavigation
Allows you to programmatically navigate between articles and collections.
Custom Hooks Shape
useTheme
Controls UI elements like sidebar visibility and contrast modes.
Custom Hooks Shape

Implementation Example

The core functionality of this module relies on the distributed nature of the Lumino backend. It is designed for high availability and low latency access.
javascript
Copy
Coppied
1import { useNavigation } from '@notate/core';
2
3    const MyButton = () => {
4     const { goToArticle } = useNavigation();
5  return (
6        <button onClick={() => goToArticle('auth')}>
7     Go to Auth
8        </button>
9   );
10};
Context Requirement
  • These hooks must be used within the NotateProvider hierarchy. They will throw an error if accessed from standalone components outside the main app context.
Page BackgroundPage Background