First commit
This commit is contained in:
commit
48866cc6ab
20 changed files with 6301 additions and 0 deletions
7
app/[id]/forceUpdate.tsx
Normal file
7
app/[id]/forceUpdate.tsx
Normal file
|
@ -0,0 +1,7 @@
|
|||
'use client'
|
||||
import { useState } from 'react'
|
||||
|
||||
export default function UseForceUpdate() {
|
||||
const [value, setValue] = useState(0); // integer state
|
||||
return () => setValue(value => value + 1); // update state to force render
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue