Skip to content

Instantly share code, notes, and snippets.

@jupier
jupier / react-hooks-cheatsheet.md
Last active April 9, 2024 16:05
React Hooks Cheatsheet

useState

function Counter({initialCount}) {
  const [count, setCount] = useState(initialCount);
  return (
    <>
      Count: {count}
  setCount(initialCount)}&gt;Reset