Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
8fb6f7d5
Commit
8fb6f7d5
authored
Sep 29, 2018
by
Tim Neutkens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use new import syntax in readme examples
parent
7f9d244d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
README.md
README.md
+5
-5
No files found.
README.md
View file @
8fb6f7d5
...
...
@@ -916,7 +916,7 @@ Here are a few ways to use dynamic imports.
```
jsx
import
dynamic
from
'next/dynamic'
const
DynamicComponent
=
dynamic
(
import
(
'../components/hello'
))
const
DynamicComponent
=
dynamic
(
()
=>
import
(
'../components/hello'
))
export
default
()
=>
(
<
div
>
...
...
@@ -932,7 +932,7 @@ export default () => (
```
jsx
import
dynamic
from
'next/dynamic'
const
DynamicComponentWithCustomLoading
=
dynamic
(
import
(
'../components/hello2'
),
{
const
DynamicComponentWithCustomLoading
=
dynamic
(
()
=>
import
(
'../components/hello2'
),
{
loading
:
()
=>
<
p
>
...
</
p
>
})
...
...
@@ -950,7 +950,7 @@ export default () => (
```
jsx
import
dynamic
from
'next/dynamic'
const
DynamicComponentWithNoSSR
=
dynamic
(
import
(
'../components/hello3'
),
{
const
DynamicComponentWithNoSSR
=
dynamic
(
()
=>
import
(
'../components/hello3'
),
{
ssr
:
false
})
...
...
@@ -971,8 +971,8 @@ import dynamic from 'next/dynamic'
const
HelloBundle
=
dynamic
({
modules
:
()
=>
{
const
components
=
{
Hello1
:
import
(
'../components/hello1'
),
Hello2
:
import
(
'../components/hello2'
)
Hello1
:
()
=>
import
(
'../components/hello1'
),
Hello2
:
()
=>
import
(
'../components/hello2'
)
}
return
components
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment