Banner Image

My First Post

78
0

Header 1

This is an array [1, 2, 3] of numbers 1 through 3.

title
import { MDXRemote } from "next-mdx-remote/rsc";
 
interface PropsT {
   params: {
      slug: string,
   };
}
 
export default async function page({ params: { slug } }: PropsT) {
   const res = await fetch("http://localhost:5000/");
   const markdown = await res.text();
 
   return (
      <div>
         <MDXRemote source={markdown} />
      </div>
   );
}

You can import and use React components in MDX files.