Echo JS 0.11.0

<~>

tracker1 comments

tracker1 115 days ago. link 1 point
I'm not 100% sure about AMP... if you have a well optimized site that works in mobile, you may actually do better than AMP.  That doesn't even count the issues in terms of site branding and navigation.
tracker1 119 days ago. link 2 points
If you're using headless chrome, why not just use the DOM?
tracker1 122 days ago. link 1 point
No, it's a way to do unit tests without actually starting a server.  but could work for your supertest example for more integration like testing.
tracker1 125 days ago. link 2 points
Here's an example:

    // server/index.js
    async function main(skip) {
      if (skip) return;

      ... rest of main ...
    }
    main(!!module.parent).catch(console.error);
    export default main;

module.parent exists when you require in a module, in this case index, say for testing... but not when you execute the module directly `node server/index` for example.

by wrapping your main logic in a function with a skip parameter, if you load the `./index.js` inside `index.test.js` it won't start your server process... in this way you can override whatever modules are used, and test that logic.
tracker1 125 days ago. link 1 point
Not sure where the down vote came from, it's definitely one of the better universal layouts I've seen...

A few points, would add in jest and tests for everything... would wrap the main server entry point so that it only runs when `!module.parent` and can be fully tested.
tracker1 128 days ago. link 1 point
Post only really explains how to do react in a more angular-like paradigm for development using MobX and TypeScript.  I'll admit, it is more apples to apples than most ng v react articles.

All of that said, it's kind of pointless really.  The Angular shops are mostly sold as an upgrade path from their existing Angular 1.x knowledge and entropy of the framework.  Merits aside.  And I'll agree that React + Redux + more is very different as an approach.

The bigger differences come in when you have a very large project.  Now you have some weird web of stores, dependencies, and data flows.  React + Redux will scale complexity at a much lower incline that with other paradigms such as the ones in the article.  If all you have is a simple form, and a simple view, it's not a big deal.  When you have hundreds of custom components, and data stretching through many data sources, it becomes harder.

Not to mention the effort to shoehorn a GraphQL reference into the mix.
tracker1 136 days ago. link 2 points
If deploying to a single server, I'd just assume setup Dokku for my apps.
tracker1 141 days ago. link 1 point
I got it in my email, but forgot about it. I actually meant to go back and fill it.
tracker1 142 days ago. link 1 point
It encourages sites to keep using a bad password validation scheme in place.  A big readme pointing out that it's far better to have a complexity requirement and indicator than it is to have arbitrary password character requirements.
[more]