Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert an example of using a JSX component. #137

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion content/posts/2019-07-10-using-mdx/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ Code:
```


import MySuperComponent from '../../../src/components/MySuperComponent'

# Some text in Markdown

<MySuperComponent />

## How-to?

```jsx{5}
Expand All @@ -49,4 +55,4 @@ other text in markdown

## Read more

👉 https://mdxjs.com
👉 https://mdxjs.com
10 changes: 10 additions & 0 deletions src/components/MySuperComponent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react'

const MySuperComponent = () => {
console.log('MySuperComponent')
return (
<h2>My SuperComponent!</h2>
)
}

export default MySuperComponent