UNPKG

next-mdx-remote-client

Version:

A wrapper of the `@mdx-js/mdx` for the `nextjs` applications in order to load MDX content. It is a fork of `next-mdx-remote`.

15 lines 530 B
import { jsx as _jsx } from "react/jsx-runtime"; import { hydrate } from "./hydrate.js"; /** * renders the content on the client side (csr), which is provided by the "hydrate" function. */ export function MDXClient(props) { const { onError: ErrorComponent, ...rest } = props; const { content, error } = hydrate(rest); if (error && !ErrorComponent) throw error; if (error && ErrorComponent) return _jsx(ErrorComponent, { error: error }); return content; } //# sourceMappingURL=MDXClient.js.map