Open shfshanyue opened 3 years ago
const [ignored, forceUpdate] = useReducer(x => x + 1, 0); function handleClick() { forceUpdate(); }
import {useState,useCallback} from 'react'; const [state,setState] = useState({}) const handleForceUpdate = useCallback(() => { setState({}) },[])