Skip to content

How to use "props" with eslint-mdx? #2610

Answered by remcohaszing
PaulRBerg asked this question in Q&A
Discussion options

You must be logged in to vote

Approach 1 is incorrect. You can’t embed MDX content inside a custom component.

The other approaches are all ok, but they are workarounds, not solutions. It’s ok to use props inside MDX. It’s a function-local variable, not a global. If this doesn’t work out of the box, it’s a bug. Feel free to report it to https://github.com/mdx-js/eslint-mdx/issues.

Replies: 1 comment 3 replies

Comment options

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

Answer selected by PaulRBerg
@JounQin
Comment options

JounQin Apr 28, 2025
Collaborator

@fauziralpiandi
Comment options

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