Thursday, October 27, 2016

async promises in a sync way?

This blog post title is pretty confusing - but if you get to read this blog post by Google, it actually makes sense.

It's actually pretty cool. Not that I don't like callbacks or promises, but I can see this being useful in more complex examples.

async function fetchDogPics(url) {
  try {
    //this looks synchronous but it isn't...
    const response = await fetch(url);
    await response.text();

  } catch (err) {
    console.log('failed', err);

  }
}



Saturday, October 15, 2016

Enums in Javascript

Found this tiny library that implements Enums in JavaScript:

https://github.com/rauschma/enumify

npm install enumify

Wednesday, March 23, 2016

Babel syntax highlighting for Sublime 3

In case you are looking for an ES6 syntax highlighting in sublime, check the babel-sublime project. Here it is: babel-sublime

Monday, March 14, 2016

Looking into ES6

I'm starting to look at ES6 and here's one post that I found useful for converting react.js components to ES6.

http://www.tamas.io/react-with-es6/

Thursday, February 4, 2016

Gentle intro to maintaining CSS with Webpack

Found a gentle intro on how to maintain CSS with Webpack (targeted at React.js).

Check it out !

http://bensmithett.com/smarter-css-builds-with-webpack/