News for hackers. Stuff that matters.
Re:Common Beginner Mistakes with React by ojkelly on Saturday March 11, 2023 @07:33PM (#35114752)
In useEffect your code runs at a specific point, where it’s safe to bridge react to the outside world. It’s not about breaking the rules, as much as you have the ability to cause and react to side effects (eg a fetch promise) and inform react about the result (with a setState).
Re:Common Beginner Mistakes with React by dgb23 on Saturday March 11, 2023 @07:39PM (#35114828)
That’s much better explanation and more precise wording than the linked article did. I like the notion of “safe bridge”.