File tree 1 file changed +13
-12
lines changed
1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -354,33 +354,34 @@ Use examples in [nextjs](https://nextjs.org/). [#52](https://github.com/uiwjs/re
354
354
355
355
``` bash
356
356
npm install next-remove-imports
357
+ npm install @uiw/react-md-editor@v3.6.0
357
358
```
358
359
359
360
``` js
360
361
// next.config.js
361
362
const removeImports = require (' next-remove-imports' )();
362
-
363
363
module .exports = removeImports ({});
364
364
```
365
365
366
366
``` jsx
367
- // pages/index.js
368
- import Head from ' next/head'
369
- import MDEditor from ' @uiw/react-md-editor' ;
370
- import ' @uiw/react-md-editor/dist/markdown-editor.css'
371
- import ' @uiw/react-markdown-preview/dist/markdown.css' ;
367
+ import " @uiw/react-md-editor/markdown-editor.css" ;
368
+ import " @uiw/react-markdown-preview/markdown.css" ;
369
+ import dynamic from " next/dynamic" ;
370
+
371
+ const MDEditor = dynamic (
372
+ () => import (" @uiw/react-md-editor" ).then ((mod ) => mod .default ),
373
+ { ssr: false }
374
+ );
372
375
373
- export default function Home () {
376
+ function HomePage () {
374
377
return (
375
378
< div>
376
- < Head>
377
- < title> Create Next App< / title>
378
- < meta name= " description" content= " Generated by create next app" / >
379
- < / Head>
380
379
< MDEditor value= " **Hello world!!!**" / >
381
380
< / div>
382
- )
381
+ );
383
382
}
383
+
384
+ export default HomePage ;
384
385
```
385
386
386
387
### Props
You can’t perform that action at this time.
1 commit comments
vercel[bot] commentedon Aug 28, 2021
Successfully deployed to the following URLs: