Closed keepforever closed 4 years ago
Nevermind, it works if I don't use a default export
MyComponent.jsx
:
import React from 'react';
export const MyComponent = props => {
return (
<div>
<h3>Hello MyComponent</h3>
</div>
);
};
index.mdx
---
title: Brian's Brain!
date: '2020-01-01'
---
import { MyComponent } from './MyComponent.js'
## Above component
<MyComponent />
## Below Component
It is my understanding, per https://mdxjs.com/advanced/components , that React components can be imported into MDX files.
When I run the starter and add a blog to the content folder it crashes.
index.mdx
:MyComponent.js
:Is importing React components not supported?