const App = () => {
const [title, setTitle] = useState('Initial Title')
useEffect(() => {
setTitle('Use Effect')
}, [])
return <h1>{title}</h1>
}
hooks-use-effect-base
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
const App = () => {
const [title, setTitle] = useState('Initial Title')
useEffect(() => {
setTitle('Use Effect')
}, [])
return <h1>{title}</h1>
}