Components
In TemplateDX, components function similarly to JSX, allowing you to pass props and children directly. To use a component, first import it, then insert it into your template. Specify any required props and content within the component tags. Inside the component, access props with {props.varName}
and render any nested content with {props.children}
.
For example:
Index file:
import Blog from './blog.mdx';
# Example
<Blog title="Turtles">
Turtles are really cool...
</Blog>
Blog Component:
# {props.title}
{props.children}