Skip to content

Instantly share code, notes, and snippets.

@ValentaTomas
Created August 29, 2021 14:12
Show Gist options
  • Save ValentaTomas/c22f695c49f3e91e12f22aa66e41ba87 to your computer and use it in GitHub Desktop.
Save ValentaTomas/c22f695c49f3e91e12f22aa66e41ba87 to your computer and use it in GitHub Desktop.
React hooks for forcing component update
const forceUpdate = useReducer(() => ({}), {})[1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment