Function inside “setInterval” does not recieve updated variables from hooks
问题 In useEffect-hook I set interval, which is running function "calculateCircle". There I do some logic, including setting state(with useState-Hook). Variables from hooks are updated, I render and see them on page, but this function keeps consolloging old values. I changed my component to the class-based component (without hooks) and everything is working now. But I wonder which is the problem using hooks. const Features = () => { const block1 = React.createRef(); const shadowText = React