Skip to main content
Version: 3.10.2

Docusaurus Client API

Docusaurus provides some APIs on the clients that can be helpful to you when building your site.

Components

<ErrorBoundary />

This component creates a React error boundary.

Use it to wrap components that might throw, and display a fallback when that happens instead of crashing the whole app.

import React from 'react';
import ErrorBoundary from '@docusaurus/ErrorBoundary';

const SafeComponent = () => (
<ErrorBoundary
fallback={({