Skip to content

Latest commit

 

History

History

hooks-use-state-base

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

hooks-use-state-base

Hooks API Reference

useEffect

const App = () => {
  const [title, setTitle] = useState<string>('Initial Title')
  const handler = () => setTitle('Change Title')

  return (
    <>
      <h1>{title}</h1>
      <button onClick={handler}>click</button>
    </>
  )
}