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.
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:
