Earlier quoted context omitted.
Checkout Next.js (React based framework) if you want to worry the least about routing, and just default to a route per page model. Next also makes it easy to do server rendering and/or pre-rendering of routes.
You can do this, but routes-per-page with parameters and working back/forward buttons with no serious deps is literally something like 15 lines of code. I think more people should just hack their own router together before introducing a dep for it.
Angular 5.0.0
151–160 of 189 posts
Re: Angular 5.0.0
#152Earlier quoted context omitted.
React and react-router are not the same thing at all. They're developed by different teams at different organisations. It's not fair to compare the two.
Of course it's fair. When comparing React with Angular it's only fair to compare the react ecosystem with angular. Nobody ever built an SPA in production with just React.
Re: Angular 5.0.0
#153Earlier quoted context omitted.
Of course it's fair. When comparing React with Angular it's only fair to compare the react ecosystem with angular. Nobody ever built an SPA in production with just React.
OTOH I'd be amazed if no-one's built an SPA in production with React and nothing else from the React ecosystem. What would be so hard about that? You can totally use it as just a view layer, if that's what you want to do. Granted, you probably use other non-React libraries, but that's not what we're talking about.
Re: Angular 5.0.0
#154From my colleagues, both front-end developers and full-stack developers, I've heard nothing but criticism of Angular >2.0.0. I would like to hear the other side. If you use fresh Angular, why?
Angular 2+ is much better than 1 - it fixes pretty much all of the warts with 1. On the flip side, there are some tradeoffs, some that is not quite Angular’s fault, although they’re tradeoffs chosen by the Angular team in designing the framework. Angular doubles down on the component-based model it tried to emphasize in Angular 1. It also is very performant. The main router is much better than Angular 1’s. I haven’t…
Re: Angular 5.0.0
#155Earlier quoted context omitted.
Angular 2+ is much better than 1 - it fixes pretty much all of the warts with 1. On the flip side, there are some tradeoffs, some that is not quite Angular’s fault, although they’re tradeoffs chosen by the Angular team in designing the framework. Angular doubles down on the component-based model it tried to emphasize in Angular 1. It also is very performant. The main router is much better than Angular 1’s. I haven’t…
That's surprising to me! My main complaints of Angular 2+ are around testing, but I've had nothing but love for React testing (enzyme, chai, karma) EDIT: whoops, mistyped. We don't use karma anymore in our React testing stack. It's mocha now.
Angular’s solution of a robust DI mechanism is a little on the heavy side, and the test execution perf is worse than Angular 1’s in general, but it is almost certainly the most powerful test helper situation available for testing frontend JS chrrently.
Note that testing serverside JS doesn’t suffer as much, since there are libraries for making use of the require cache for mocking such as testdouble.
Re: Angular 5.0.0
#156Congrats to the new release! I've got a lot of respect for putting so much energy into open source projects. Predictably, the discussion evolves around Angular vs react/vue/ember or whatever (personally, I like react). My current customer project introduced me to a new generation of web front-end developers specializing in a particular framework (react/redux in our case) but know very little about CSS and the myriad…
Re: Angular 5.0.0
#157Earlier quoted context omitted.
Angular 2 will not help your team deliver valuable web experiences to customers any more quickly or reliably than Angular 1. Probably almost certainly the opposite. I'd argue most teams, if they're willing to go all-in on an SPA framework (which for most apps is a waste of time and money imo) would be better off with React + TSX. Edit: Vue is probably closer to the "Angular way" with databinding, but component to com…
I disagree. In my experience, developing a REST API and SPA with Angular2+ has been the quickest development cycle I've experienced. Not only is it very pleasant to work in, but the end product for the user is high quality. Vue is great, but it's lack of proper component support makes it a bit annoying to work with. I have just migrated an app that was on Angular 2 RC4 to Angular 5 with little to no migrational woes.…
Re: Angular 5.0.0
#158Earlier quoted context omitted.
You can do this, but routes-per-page with parameters and working back/forward buttons with no serious deps is literally something like 15 lines of code. I think more people should just hack their own router together before introducing a dep for it.
It might be an interesting academic problem to chew on but there's edge cases there with history, route parsing, nested routes etc that are beyond beginner level I would argue. There's something to be said for using a massively popular lib like React Router that the rest of the community is battle testing for you.
* Route parsing: just use pathToRegexp. Yes, it's a dep, but it's an easy, well-understood one that does one simple thing you can get your head around. Or: don't use route paths with parameters at all (it's overkill for a lot of applications) and just use a trivial switch statement.
* Nested routes: why bother? The routes we're talking about are totally artificial. Having a formal, declarative route system in the first place is already a lot of "engineering". Just define your routes so they don't do that.
My argument is that the hand-hacked system that does this will be approximately as capable, future-proof, reliable and performant as the first production system anyone builds with react-router will be, the learning curve is shorter, the code you're building won't have APIs shift out from under it, and the final system will be trivial to port to react-router once that library stabilizes, if you ever wanted to bother doing that.
Re: Angular 5.0.0
#159Earlier quoted context omitted.
Angular 2 will not help your team deliver valuable web experiences to customers any more quickly or reliably than Angular 1. Probably almost certainly the opposite. I'd argue most teams, if they're willing to go all-in on an SPA framework (which for most apps is a waste of time and money imo) would be better off with React + TSX. Edit: Vue is probably closer to the "Angular way" with databinding, but component to com…
I disagree. In my experience, developing a REST API and SPA with Angular2+ has been the quickest development cycle I've experienced. Not only is it very pleasant to work in, but the end product for the user is high quality. Vue is great, but it's lack of proper component support makes it a bit annoying to work with. I have just migrated an app that was on Angular 2 RC4 to Angular 5 with little to no migrational woes.…
Sounds like you haven't used Vue recently. As in, over the past year and a half.
Re: Angular 5.0.0
#160Earlier quoted context omitted.
Vue has one big advantage over React for an Angular shop: the views are often trivial to port, while JSX is further syntactically from Angular templates.
IMO the difference in the quantity and quality of packages available for React more than makes up for that difference.