0

If I have some stuff in a markdown file foo.md, what is the best way to "inject" this into a component <Bar />? I'm assuming I will have to use some props right? Or is MDX not suitable for this type of problem? Thanks!

1 Answers1

0

Edit: I think I've figured it out -- you can just directly import it like import Content from "./foo.mdx", you just need to configure some files correctly so the imports work (I was using nextjs and in next-env.d.ts I needed to add declare module '*.mdx'). Still curious if there are other ideas though.