Closed
Description
React version:
Steps To Reproduce
- open react developer tools
Link to code example:
The current behavior
STOP
The expected behavior
no stop
sorry I cant open codesandbox page
this the Minimum recurrence code
export default function App() {
const [count, set_count] = useState(0)
const ref_count = useRef()
ref_count.current = () => set_count(count + 1)
useEffect(() => {
var id = setInterval(() => {
ref_count.current()
}, 100)
return () => clearInterval(id)
}, [])
return count
}