Skip to content

Instantly share code, notes, and snippets.

Last active Dec 25, 2019
What would you like to do?
const [count, setCount] = React.useState(0);

function fn() {
  //  access count which is available in fn scope
  setCount(count + 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment