Considering below hooks example
import { useState } from \'react\'; function Example() { const [count, setCount] = useState(0); return
Solution in one single line:
const [,forceRender] = useReducer((s) => s+1, 0)
You can learn about useReducer here. https://reactjs.org/docs/hooks-reference.html#usereducer