Files
gitbook/packages/react-math/src/MathJaXLazy.tsx
T
2026-08-13 13:18:42 +00:00

19 lines
430 B
TypeScript

'use client';
import React from 'react';
import type { MathJaXFormulaProps } from './MathJaX';
const MathJaXFormula = React.lazy(() => import('./MathJaX'));
/**
* Lazy component that loads MathJax and renders the formula.
*/
export function MathJaXLazy(props: MathJaXFormulaProps) {
return (
<React.Suspense fallback={props.fallback}>
<MathJaXFormula {...props} />
</React.Suspense>
);
}