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
ec281df7
Unverified
Commit
ec281df7
authored
Aug 23, 2020
by
Luis Alvarez D
Committed by
GitHub
Aug 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove experimental example (#16497)
@Timer This example seems to not be needed anymore
parent
4e0b4014
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
0 additions
and
216 deletions
+0
-216
.gitignore
examples/z-experimental-refresh/.gitignore
+0
-34
README.md
examples/z-experimental-refresh/README.md
+0
-14
ClickCount.js
examples/z-experimental-refresh/components/ClickCount.js
+0
-15
ClickCount.module.css
...s/z-experimental-refresh/components/ClickCount.module.css
+0
-32
global.css
examples/z-experimental-refresh/global.css
+0
-41
package.json
examples/z-experimental-refresh/package.json
+0
-15
_app.js
examples/z-experimental-refresh/pages/_app.js
+0
-5
index.js
examples/z-experimental-refresh/pages/index.js
+0
-60
No files found.
examples/z-experimental-refresh/.gitignore
deleted
100644 → 0
View file @
4e0b4014
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
# vercel
.vercel
examples/z-experimental-refresh/README.md
deleted
100644 → 0
View file @
4e0b4014
# z-experimental-refresh
This is an
**experimental**
demo of React Fast Refresh.
Please do not use these features in your application or project (yet).
## Usage
Run the following command to get started:
```
bash
yarn dev
# or
npm run dev
```
examples/z-experimental-refresh/components/ClickCount.js
deleted
100644 → 0
View file @
4e0b4014
import
{
useCallback
,
useState
}
from
'react'
import
styles
from
'./ClickCount.module.css'
export
default
function
ClickCount
()
{
const
[
count
,
setCount
]
=
useState
(
0
)
const
increment
=
useCallback
(()
=>
{
setCount
((
v
)
=>
v
+
1
)
},
[
setCount
])
return
(
<
button
className
=
{
styles
.
btn
}
type
=
"button"
onClick
=
{
increment
}
>
Clicks
:
{
count
}
<
/button
>
)
}
examples/z-experimental-refresh/components/ClickCount.module.css
deleted
100644 → 0
View file @
4e0b4014
button
.btn
{
margin
:
0
;
border
:
1px
solid
#d1d1d1
;
border-radius
:
5px
;
padding
:
0.5em
;
vertical-align
:
middle
;
white-space
:
normal
;
background
:
none
;
line-height
:
1
;
font-size
:
1rem
;
font-family
:
inherit
;
transition
:
all
0.2s
ease
;
}
button
.btn
{
padding
:
0.65em
1em
;
background
:
#0076ff
;
color
:
#fff
;
border
:
none
;
cursor
:
pointer
;
transition
:
all
0.2s
ease
;
}
button
.btn
:focus
{
outline
:
0
;
border-color
:
#0076ff
;
}
button
.btn
:hover
{
background
:
rgba
(
0
,
118
,
255
,
0.8
);
}
button
.btn
:focus
{
box-shadow
:
0
0
0
2px
rgba
(
0
,
118
,
255
,
0.5
);
}
examples/z-experimental-refresh/global.css
deleted
100644 → 0
View file @
4e0b4014
body
{
font-family
:
'SF Pro Text'
,
'SF Pro Icons'
,
'Helvetica Neue'
,
'Helvetica'
,
'Arial'
,
sans-serif
;
padding
:
20px
20px
60px
;
max-width
:
680px
;
margin
:
0
auto
;
font-size
:
16px
;
line-height
:
1.65
;
word-break
:
break-word
;
font-kerning
:
auto
;
font-variant
:
normal
;
-webkit-font-smoothing
:
antialiased
;
-moz-osx-font-smoothing
:
grayscale
;
text-rendering
:
optimizeLegibility
;
hyphens
:
auto
;
}
h2
,
h3
,
h4
{
margin-top
:
1.5em
;
}
code
,
pre
{
font-family
:
Menlo
,
Monaco
,
Lucida
Console
,
Liberation
Mono
,
DejaVu
Sans
Mono
,
Bitstream
Vera
Sans
Mono
,
Courier
New
,
monospace
,
serif
;
font-size
:
0.92em
;
color
:
#d400ff
;
}
code
:before
,
code
:after
{
content
:
'`'
;
}
hr
{
border
:
none
;
border-bottom
:
1px
solid
#efefef
;
margin
:
5em
auto
;
}
examples/z-experimental-refresh/package.json
deleted
100644 → 0
View file @
4e0b4014
{
"name"
:
"z-experimental-refresh"
,
"version"
:
"1.0.0"
,
"scripts"
:
{
"dev"
:
"next"
,
"build"
:
"next build"
,
"start"
:
"next start"
},
"dependencies"
:
{
"next"
:
"canary"
,
"react"
:
"^16.9.0"
,
"react-dom"
:
"^16.9.0"
},
"license"
:
"MIT"
}
examples/z-experimental-refresh/pages/_app.js
deleted
100644 → 0
View file @
4e0b4014
import
'../global.css'
export
default
function
MyApp
({
Component
,
pageProps
})
{
return
<
Component
{...
pageProps
}
/
>
}
examples/z-experimental-refresh/pages/index.js
deleted
100644 → 0
View file @
4e0b4014
import
{
useCallback
,
useEffect
,
useState
}
from
'react'
import
ClickCount
from
'../components/ClickCount'
import
styles
from
'../components/ClickCount.module.css'
function
a
()
{
console
.
log
(
// hello
document
.
body
()
)
}
function
foo
()
{
a
()
}
function
Home
()
{
const
[
count
,
setCount
]
=
useState
(
0
)
const
increment
=
useCallback
(()
=>
{
setCount
((
v
)
=>
v
+
1
)
},
[
setCount
])
useEffect
(()
=>
{
const
r
=
setInterval
(()
=>
{
increment
()
},
250
)
return
()
=>
{
clearInterval
(
r
)
}
},
[
increment
])
return
(
<
main
>
<
h1
>
Home
<
/h1
>
<
div
>
<
p
>
Auto
Incrementing
Value
<
/p
>
<
p
>
Current
value
:
{
count
}
<
/p
>
<
/div
>
<
hr
/>
<
div
>
<
p
>
Component
with
State
<
/p
>
<
ClickCount
/>
<
/div
>
<
hr
/>
<
div
>
<
button
className
=
{
styles
.
btn
}
type
=
"button"
onClick
=
{(
e
)
=>
{
setTimeout
(()
=>
document
.
parentNode
(),
0
)
foo
()
}}
>
Throw
an
Error
<
/button
>
<
/div
>
<
/main
>
)
}
export
default
Home
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