Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Developer tips and best practices

Using Providers for MyST content

Providers create React contexts so deeply nested components can share state and keep isolated subtrees in sync. For example, wrapping a page in <ArticleProvider>...</ArticleProvider> shares the current article’s kind, frontmatter, and references with every descendant, while TabStateProvider ensures tab interactions remain local to the subtree you wrap.

Any component that renders MyST content (such as <MyST ast={content} />) should sit inside the provider stack used by the rest of the app. See themes/book/app/routes/$.tsx#L98-L121 for a concrete example.