I've seen people put a ref in a useEffect dependency array and pretend it works. My understanding is refs are stable by contract, so it's a no-op — but does that make it safe or just silently wrong? What do you do when an effect needs the latest ref value AND needs to react to other deps?
17
0 comments