Returns a function that can be invoked to force an update / re-render.
stable force update function
Force a component to re-render.
import { useForceUpdate } from "@trashpanda001/helpers/react"function Component() { const forceUpdate = useForceUpdate() return <button onClick={forceUpdate}>Refresh</button>} Copy
import { useForceUpdate } from "@trashpanda001/helpers/react"function Component() { const forceUpdate = useForceUpdate() return <button onClick={forceUpdate}>Refresh</button>}
Returns a function that can be invoked to force an update / re-render.