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

annotation incorrect #452

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,10 @@ _Assuming usage in a Next.js 13+ application using the `app` directory._

#### Basic

```tsx
```jsx
import { MDXRemote } from 'next-mdx-remote/rsc'

// app/page.js
// app/page.jsx
export default function Home() {
return (
<MDXRemote
Expand All @@ -456,10 +456,10 @@ export default function Home() {

#### Loading state

```tsx
```jsx
import { MDXRemote } from 'next-mdx-remote/rsc'

// app/page.js
// app/page.jsx
export default function Home() {
return (
// Ideally this loading spinner would ensure there is no layout shift,
Expand All @@ -479,8 +479,8 @@ export default function Home() {

#### Custom Components

```tsx
// components/mdx-remote.js
```jsx
// components/mdx-remote.jsx
import { MDXRemote } from 'next-mdx-remote/rsc'

const components = {
Expand All @@ -501,8 +501,8 @@ export function CustomMDX(props) {
}
```

```tsx
// app/page.js
```jsx
// app/page.jsx
import { CustomMDX } from '../components/mdx-remote'

export default function Home() {
Expand All @@ -520,7 +520,7 @@ export default function Home() {
#### Access Frontmatter outside of MDX

```tsx
// app/page.js
// app/page.tsx
import { compileMDX } from 'next-mdx-remote/rsc'

export default async function Home() {
Expand Down