News for hackers. Stuff that matters.
Re:A guide to useEffect in React by cageface on Monday March 11, 2019 @03:07AM (#19357209)
I've had way more random problems from not binding class members correctly than I have with useEffect. Hooks have allowed me to rip out a bunch of JS class boilerplate and my code is cleaner and easier to read as a result.
Re:A guide to useEffect in React by korm on Monday March 11, 2019 @03:21AM (#19357250)
Are you against using Babel and the class properties proposal? Binding members shouldn't have been a problem in your codebase in recent years.
Re:A guide to useEffect in React by cageface on Monday March 11, 2019 @03:29AM (#19357270)
I use Typescript. I'm not interested in adding another processing/parsing tool to the stack I already have. Hooks are a much more elegant solution to state management than classes, IMO, but it will probably take some time for best practices to emerge, just as they did for classes.
Re:A guide to useEffect in React by paperpunk on Monday March 11, 2019 @03:53AM (#19357348)
TypeScript already supports those 'class properties' - and with a few extra features - so you don't need to use Babel for this syntax: you already have it.

I'd still rather use hooks though :)