Skip to content

Commit 99b241c

Browse files
authored
Updated readme.md to reflect default export removal
Signed-off-by: Ugo Baroncini <ugobaroncini@gmail.com>
1 parent ffdae57 commit 99b241c

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

readme.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ npm install react-markdown
101101
In Deno with [`esm.sh`][esmsh]:
102102

103103
```js
104-
import Markdown from 'https://esm.sh/react-markdown@10'
104+
import { Markdown } from 'https://esm.sh/react-markdown@10'
105105
```
106106

107107
In browsers with [`esm.sh`][esmsh]:
108108

109109
```html
110110
<script type="module">
111-
import Markdown from 'https://esm.sh/react-markdown@10?bundle'
111+
import { Markdown } from 'https://esm.sh/react-markdown@10?bundle'
112112
</script>
113113
```
114114

@@ -119,7 +119,7 @@ A basic hello world:
119119
```js
120120
import React from 'react'
121121
import {createRoot} from 'react-dom/client'
122-
import Markdown from 'react-markdown'
122+
import { Markdown } from 'react-markdown'
123123

124124
const markdown = '# Hi, *Pluto*!'
125125

@@ -145,7 +145,7 @@ URLs directly):
145145
```js
146146
import React from 'react'
147147
import {createRoot} from 'react-dom/client'
148-
import Markdown from 'react-markdown'
148+
import { Markdown } from 'react-markdown'
149149
import remarkGfm from 'remark-gfm'
150150

151151
const markdown = `Just a link: www.nasa.gov.`
@@ -173,7 +173,6 @@ This package exports the identifiers
173173
[`MarkdownHooks`][api-markdown-hooks],
174174
and
175175
[`defaultUrlTransform`][api-default-url-transform].
176-
The default export is [`Markdown`][api-markdown].
177176

178177
It also exports the additional [TypeScript][] types
179178
[`AllowElement`][api-allow-element],
@@ -375,7 +374,7 @@ which adds support for strikethrough, tables, tasklists and URLs directly:
375374
```js
376375
import React from 'react'
377376
import {createRoot} from 'react-dom/client'
378-
import Markdown from 'react-markdown'
377+
import { Markdown } from 'react-markdown'
379378
import remarkGfm from 'remark-gfm'
380379

381380
const markdown = `A paragraph with *emphasis* and **strong importance**.
@@ -445,7 +444,7 @@ strikethrough:
445444
```js
446445
import React from 'react'
447446
import {createRoot} from 'react-dom/client'
448-
import Markdown from 'react-markdown'
447+
import { Markdown } from 'react-markdown'
449448
import remarkGfm from 'remark-gfm'
450449

451450
const markdown = 'This ~is not~ strikethrough, but ~~this is~~!'
@@ -481,7 +480,7 @@ In this case, we apply syntax highlighting with the seriously super amazing
481480
```js
482481
import React from 'react'
483482
import {createRoot} from 'react-dom/client'
484-
import Markdown from 'react-markdown'
483+
import { Markdown } from 'react-markdown'
485484
import {Prism as SyntaxHighlighter} from 'react-syntax-highlighter'
486485
import {dark} from 'react-syntax-highlighter/dist/esm/styles/prism'
487486
@@ -543,7 +542,7 @@ is used to support math in markdown, and a transform plugin
543542
```js
544543
import React from 'react'
545544
import {createRoot} from 'react-dom/client'
546-
import Markdown from 'react-markdown'
545+
import { Markdown } from 'react-markdown'
547546
import rehypeKatex from 'rehype-katex'
548547
import remarkMath from 'remark-math'
549548
import 'katex/dist/katex.min.css' // `rehype-katex` does not import the CSS for you
@@ -661,7 +660,7 @@ can spare the bundle size (±60kb minzipped), then you can use
661660
```js
662661
import React from 'react'
663662
import {createRoot} from 'react-dom/client'
664-
import Markdown from 'react-markdown'
663+
import { Markdown } from 'react-markdown'
665664
import rehypeRaw from 'rehype-raw'
666665

667666
const markdown = `<div class="note">

0 commit comments

Comments
 (0)