あすぱる
あすぱる
RReactiflux
Created by あすぱる on 12/3/2023 in #react-forum
Is impure to update "other component's" useRef within useEffect?
No, if you only want to update the "state", simply pass the setState function to the props; when you execute the setState function, React will automatically go back to the parent component and re-render it.
6 replies