Echo JS 0.11.0

<~>

tracker1 comments

tracker1 2429 days ago. link 1 point
Just a simple pattern for loading async data with react, redux and redux-thunk middleware.

I tend to do this with a higher order component including async import of child component, etc... it works well for the 90% cases I've used it with.  sub-state/reducer logic is only slightly different, but the logic is bog simple and holds up well enough.

I also include a reducer handler for when the location/init happens as a lot of times a refresh or location change in the middle of an async call can leave things broken.
tracker1 2429 days ago. link 1 point
What does this have to do with Echo JS or development at all?  It's interesting, but I don't think this is the right place for this sort of thing.
tracker1 2430 days ago. link 1 point
No criteria for how the selected items were selected.
tracker1 2433 days ago. link 1 point
Interesting, not really JS based... what would be cool would be a similar client as a globally installable npm module that uses environment variable(s) to create an empty repo attached to an account/group as a command line client.

That would be JS based and pretty nifty/reusable.
tracker1 2434 days ago. link 4 points
Nice article/writeup.  I find that if you are permitted to make heavy refactoring more of a norm, it's incredibly beneficial.  Outside of that, I'd rather not have it in the first place.  I tend to be pretty stringent in terms of project structure (discovery first), which tends to lessen the need.  It takes a lot of time to add all the typing information.  Also, as the article mentions adding to certain types of JS functions is painful at best.  Not to mention default linting is very strict and makes it even more difficult to bypass in practice.

As to JS tooling (babel specifically), odds are if you're using newer features, or supporting older browsers (IE), you'll need babel anyway (and likely multiple builds/targets).  async/await and conditional continuation operator (?.) are two of the big ones the former for old browsers, the latter just plain not in TS.

NOTE: it might be worth it to enable the types for better VS Code for outside libraries, which can improve things.  And/Or disabling all required usage for linting purposes, which will make it easier to bypass and opt in where really needed.

I'm firmly in the rather not have it category, but I can see the potential value.
tracker1 2435 days ago. link 1 point
Also, async/await are not based on generators... they are functions that return a promise, the use of generators is an implementation detail for babel transforms.
tracker1 2435 days ago. link 1 point
Why would async/await be future?  All current/modern browsers support it, and you can shim (via babel etc) for IE.
tracker1 2435 days ago. link 1 point
Sorry for the excessively gruff response (wrote more in my response to your coworker).
[more]