obsidian-dev-utils
Version:
This is the collection of useful functions that you can use for your Obsidian plugin development
24 lines (23 loc) • 472 B
text/typescript
/**
* @packageDocumentation
*
* Passes obsidian {@link App} instance to React components.
*/
import { App } from 'obsidian';
/**
* The context for the app.
*
* Usage:
* ```tsx
* <AppContext.Provider value={app}>
* <YourComponent />
* </AppContext.Provider>
* ```
*/
export declare const AppContext: import("react").Context<App | undefined>;
/**
* The hook to use the app context.
*
* @returns The app instance.
*/
export declare function useApp(): App;