News for hackers. Stuff that matters.
Re:Why does anyone use Angular in production? by bern4444 on Thursday November 04, 2021 @11:00PM (#29114995)
I've never really understood the hooks are complicated line.

Maybe it's the understanding that they integrate with React's event system (which I think is powered by something like rxjs/observables), but hooks make the most sense once you start implementing custom hooks which are incredibly easy to write and reuse.

Need a hook for undoable (and re-doable) state? It can be implemented in ~30 lines and then used anywhere in your application.

Need a hook to manage data from an API across your application, a custom hook makes this trivial especially if you need to connect it with your global state management (like redux/context/etc).

JSX is nothing special and it's possible (and trivial) to set up your component files to use a .js extension.

The only thing JSX does is let you write components with an HTML like syntax instead of with a bunch of function calls. I find this extremely ergonomic.

Bad React is when the two ideas - view and component logic - are mixed too much. That's the point at which components need to be broken down further to avoid bloat or a custom hook is needed to handle data.

Re:Why does anyone use Angular in production? by keb_ on Thursday November 04, 2021 @11:45PM (#29115217)
I feel like you're speaking completely past me, because I never said using hooks were complicated. On the surface, they simplify quite a whole lot to the point where complete beginners to JavaScript can grasp them and be productive quickly.