Skip to content

Instantly share code, notes, and snippets.

@enjoylife
Created October 14, 2019 03:59
Show Gist options
  • Save enjoylife/d1bc5c05d7200433ac2045b65e6dad07 to your computer and use it in GitHub Desktop.
Save enjoylife/d1bc5c05d7200433ac2045b65e6dad07 to your computer and use it in GitHub Desktop.
const useForceRender = () => {
const [, forceRender] = useReducer((oldVal) => oldVal + 1, 0)
return forceRender
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment