Skip to content

Migrate import { mdx } from "@mdx-js/react"; to v2 #1951

Answered by wereHamster
wereHamster asked this question in Q&A
Discussion options

You must be logged in to vote

Tried this:

import { useMDXComponents } from "@mdx-js/react";

const components = useMDXComponents()

<components.h3>Heading</components.h3>

but does not type check:

JSX element type 'components.h3' does not have any construct or call signatures.ts(2604)

But it works (ie. heading shows up, does not crash app).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@wooorm
Comment options

@wereHamster
Comment options

@wooorm
Comment options

Answer selected by ChristianMurphy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants