Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always treat _createMdxContent as a JSX component #2445

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Feb 25, 2024

  1. Always treat _createMdxContent as a JSX component

    If the user provides a `wrapper` component, `_createMdxContent` was
    treated as a JSX component. Otherwise it was invoked as a function.
    Because `_createMdxContent` uses a hook, this hooks becomes part of the
    `MDXContent` component conditionally. This breaks React’s rule of hooks.
    
    Closes #2444
    remcohaszing committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    225b9ce View commit details
    Browse the repository at this point in the history