diff --git a/docs/getting-started/react.md b/docs/getting-started/react.md index c7d22e9a..b16e5dde 100644 --- a/docs/getting-started/react.md +++ b/docs/getting-started/react.md @@ -110,7 +110,7 @@ Another alternative is to create a React context for the app to make it globally import * as React from "react"; import { App } from 'obsidian'; - export const AppContext = React.createContext(undefined); + export const AppContext = React.createContext({} as App); ``` 1. Wrap the `ReactView` with a context provider and pass the app as the value.