Skip to content

Instantly share code, notes, and snippets.

@haldarmahesh
Last active October 28, 2018 23:07
Show Gist options
  • Save haldarmahesh/4d162ae8507e9032bd5de7224fd142f7 to your computer and use it in GitHub Desktop.
Save haldarmahesh/4d162ae8507e9032bd5de7224fd142f7 to your computer and use it in GitHub Desktop.
const countVariables = useState(0); // return two items in an array
const count = countVariables[0]; // first item from array
const setCount = countVariables[1]; // second item from array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment