5 ms·
The ship has sailed on Angular IMO ... React just nailed it and I say that as a person who REALLY dislikes Facebook as a company. The React team at Facebook ha
by burtonator 6y ago
The ship has sailed on Angular IMO ... React just nailed it and I say that as a person who REALLY dislikes Facebook as a company.
The React team at Facebook has their act together and does a great job. The new Facebook redesign with chunks is really amazing.
React hooks I think as they are currently designed is an anti-pattern because of the way they're too 'magic' and can bust the cache accidentally and cause performance bugs but conversely can cause data loss bugs because your code doesn't properly use hooks.
Bad use of an API should yield compilation errors (in Typescript) NOT cause all sort of runtime errors with caching.
- umvi 6y agoAngular's fatal mistake was the name change around Angular 2 ("Don't call it 'Angular 2', just call it 'Angular'"). The problem is that Angular 1 is VERY different from Angular 2+ and searching "Angular" gave Angular 1 results... the search index of Google was poisoned for so long with the wrong results that I switched to React out of frustration.
- hnrodey 6y agogoogle: angular http post call -angularjs
- bob1029 6y agoThe transition from Angular 1=>2 made it clear to us that this was not a good framework to use for long-term projects. We moved to RiotJS which was a breath of fresh air... for a little while. Then the same problems started plaguing that project in terms of major breaking changes so we hopped ship again. Now, we are on top of Blazor using server-side rendering. Our hopes are that by taking up allegiance with Microsoft that we can ward off horrific breaking changes for a few years and actually build something valuable during that time. Blazor is particularly appealing to use because we were able to completely define our UI state machines in C# classes that can be tested in perfect isolation from any client/browser interaction. We can also directly inject & reuse our existing business services without needing to develop any JSON APIs or other wasteful boilerplate.
- ep103 6y agoThat said, the name change was reasonable, because the changes in the framework were so, so vastly different.
- umvi 6y agoI agree name change was necessary, but "Angular" was a bad pick because of search index collisions with previous generation. Should have chosen a name that would not have caused search collisions.
- steve_adams_86 6y ago"too 'magic'" Ironically, I like them because they remove the magic from state management. I really enjoy using and writing hooks.
- deckard1 6y agoI will agree that hooks are a sin against all that is good and proper. Stateful "functions" is just so asinine I don't even know where to begin. It's like they wanted to ride the hype of functional programming, but didn't understand referential transparency. And somehow that is supposed to be better than classes which, by design, are intended to hold state. Which brings me to where I disagree with you that React team has their act together. If anything, the hooks API is tacit acknowledgement that they messed up on component lifecycles and their original component model and really don't know what they are doing. If you go back even a year earlier, most people seem to have forgotten that they redid their entire set of lifecycle methods before scraping it all for hooks. They haven't been able to get a stable API together because, architecturally-speaking, they don't know what they are doing. The only alternative explanation is that hooks is the React team trying to remain relevant through a misguided API "refresh". Which is definitely not a good look for anyone wanting to take a framework seriously. Outside of Facebook, literally no one has the money to rewrite their app every year. Hooks aren't even backwards compatible. It's not even self-compatible with its current version! Since you can't mix hooks and classes. Just insane.
- xwdv 6y agoReact hooks are just syntactic sugar. You can replicate the entire behavior in a purely functional way if you want, but nobody has time for that.
- j-krieger 6y ago> Stateful "functions" is just so asinine I don't even know where to begin So, a closure? I see gripes about hooks mostly on hn. Most of the industry loves it, and for good reason. There is nothing to „understand“ about hooks. You don‘t have to think about what should happen when. Just use hooks to get what you want and forget the rest. If anything, it‘s easier than before.
- datagram 6y agoI personally love hooks, but I can't agree with the claim that "there is nothing to understand about hooks." For starters, they have to be used in a specific way, or else it causes bugs[1]. And there are plenty of other potentially non-obvious things in the (lengthy) FAQ[2]. Once you understand how hooks work they're much easier to work with than class components, but there's definitely a learning curve to using them correctly for anything beyond the simplest use cases. [1]: https://reactjs.org/docs/hooks-rules.html https://reactjs.org/docs/hooks-rules.html [2]: https://reactjs.org/docs/hooks-faq.html https://reactjs.org/docs/hooks-faq.html