Skip to main content

Powered by MDX

You can write JSX and use React components within your Markdown thanks to MDX. You can write Markdown alongside your JSX!

Below are few examples of JSX and React components within Markdown.

Inline components

Docusaurus green and Facebook blue are my favorite colors. `Highlight` component is created within this Markdown file.

Shared components

We can also get a little creative with it. Below are two examples of the same Quiz component with different props. Can you try and answer the following questions?

What function allows you to render React content in an HTML page?

Single

Which hook is used to create states inside functional components?

Single

What are the different ways to share data in React?

Multiple

Of course the following EditedBy is also a shared component. It takes name and date as props 😄

AuthorVijay dev
On12/05/2023