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.
Activity
schardev commentedon Jul 16, 2023
You cannot just import
.mdxfiles and expect them to work as component. You have to give the raw code touseMDXComponent()hook you get fromnext-contentlayer/hookswhich will in turn give you a component that you can render. See this and this.wuchendi commentedon Jul 16, 2023
Thank you for your reply. Is that right?

schardev commentedon Jul 16, 2023
@wuchendi I will suggest you to go through the official contentlayer docs. Start with this page if you have already set up most stuff.