wrt #10, I prefer feature oriented structure, not just UI oriented.. this can be components and/or higher order services and utils.
#11, not all frontend devs know redux, but it is very popular in React circles and can work well with ng2... I had some issues with synchronizing the ng2 router (before the recent change, not sure about current version) with redux, and the redux-angular2 injection is improved, but not my preference.
I think this would be really useful with the composition operators (<< and >>). Would be nice to see this added as a proposal for EcmaScript stage 0, and a babel implementation.
While interesting, the form example looks alien, to say the least...
<form ref="login" className="login">
<input name="email" type="email" />
...
</form>
Would be more idiomatic... Though at 2kb, it's hardly worth complaining about... Preact isn't much larger, but has more idiomatic support for react-style JSX, which I've used a couple times now.
Yeah, though npm is really an ecosystem built around cjs modules (though some moving towards ES6), and a lot of code now being written in ES6. In some cases, it's hard to decide to leave the ./src directory or not, in addition to ./dist for the potential of tree shaking etc.
Some people prefer observable patterns... I'm with you, I prefer redux... that said, there is value to understanding the different approaches, as you will see them in the wild.
Personally, I try to get webpack + babel added/configured as early as possible, and in instances like this, just use es6/cjs modules and bypass as much of the angularisms as possible... I'm on a project right now, that I'd been working to overcome resistance to get wp+babel setup, and finally have it in for the next major release... about 2-3x as productive now.
If you're pulling from npm, you should be getting the already built version. And to use it, you can use a regular function expression instead of the fat-arrow syntax. I'm not sure what requirement you're referring to.
The project itself is using wp/babel, but the output is usable, and what's in npm that you can use without it. All the dependencies in package.json are dev dependencies, if you do a prod install, it won't even download them.
That said, I can't think if the last project I started that wasn't using babel.
Man, promises + async/await is so much cleaner...
async function doStuffInSeries() {
var r1 = await doThing1();
var r2 = await doThing2();
if (r2) {
await doThing3();
}
return {r1,r2};
}
Much easier to follow than the module in question.. also not sure what it really offers over the `async` package, beyond somewhat smaller footprint.
Well, it's an improvement over a few months ago... though, I'm curious if they're still limited to two layers on the routers for deferring a route/root to a child.
Also, it's kind of disturbing to see significant changes this far along. I still don't care for ng (2 is better than 1), just the same, I find react components more intuitive.
While interesting, the form example looks alien, to say the least... <form ref="login" className="login"> <input name="email" type="email" /> ... </form> Would be more idiomatic... Though at 2kb, it's hardly worth complaining about... Preact isn't much larger, but has more idiomatic support for react-style JSX, which I've used a couple times now.Man, promises + async/await is so much cleaner... async function doStuffInSeries() { var r1 = await doThing1(); var r2 = await doThing2(); if (r2) { await doThing3(); } return {r1,r2}; } Much easier to follow than the module in question.. also not sure what it really offers over the `async` package, beyond somewhat smaller footprint.