Skip to content

(@mdx-js/react) Where is the exported Components type? #2104

@khinshankhan

Description

@khinshankhan

Initial checklist

Affected packages and versions

@mdx-js/react^2.1.2

Link to runnable example

Steps to reproduce

Install the package @mdx-js/react and try to import mdx components type.

Expected behavior

Until recently I was on an old version of v1, which had MDXProviderComponentsProp as an available when using @types/mdx-js__react + https://mdxjs.com/packages/react/#types seemed to indicate it was exported? So, I expected there to be an export for Components.

Actual behavior

Components is not available

image

Seeing https://github.com/mdx-js/mdx/blob/main/packages/react/index.js didn't export it, I figured out after going through the package to install mdx/types and am now using MDXComponents ie import { MDXComponents } from "mdx/types";.

If this is the proper way to use the type, I think https://mdxjs.com/packages/react/#types might be a little misleading and could include the bit to install the package to use this type. Actually, it should probably link to https://mdxjs.com/docs/getting-started/#types?

Runtime

Node v16

Package manager

pnpm

OS

Linux

Build and bundle tools

Gatsby

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions