Skip to content

Raw html in mdx files doesn't defer rendering to _components #2314

Answered by wooorm
zachkirsch asked this question in Q&A
Discussion options

You must be logged in to vote

Correct, “normal” components you write in MDX can’t be swapped. You should be able to find more issues discussing this. That’s because JSX already has a mechanism for that: Use a capital (the actual rules are more complex):

<P>Something wrapped in my fancy P component</P>

Whereas, if we would do what you want, it would be hard/weird to not swap components. Sometimes people want to use their own MyHeadingComponent for # this but not for <h1>this</h1>.

Some more info in the Components section in the docs!

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@jzxhuang
Comment options

@ChristianMurphy
Comment options

Answer selected by wooorm
Comment options

You must be logged in to vote
0 replies
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