You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You cannot just import .mdx files and expect them to work as component. You have to give the raw code to useMDXComponent() hook you get from next-contentlayer/hooks which will in turn give you a component that you can render. See this and this.
You cannot just import .mdx files and expect them to work as component. You have to give the raw code to useMDXComponent() hook you get from next-contentlayer/hooks which will in turn give you a component that you can render. See this and this.
This discussion was converted from issue #512 on July 17, 2023 13:43.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I am using contentlayer and MDX, and I am testing based on the example template shadcn/next-contentlayer.
However, I have encountered an issue and I'm not sure how to correctly import MDX components in .tsx files.
code:

All reactions