Posts

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);   } }

Enums in Javascript

Found this tiny library that implements Enums in JavaScript: https://github.com/rauschma/enumify npm install enumify

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

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/

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/

One more webpack - react.js tutorial

Very basic tutorial on setting up webpack for react.js with hot reload. All the good things! https://robots.thoughtbot.com/setting-up-webpack-for-react-and-hot-module-replacement

Heroku setup for webpack

I'm looking into webpack for react and trying to setup a small project on heroku: Here's a tutorial I want to follow: http://ditrospecta.com/javascript/react/es6/webpack/heroku/2015/08/08/deploying-react-webpack-heroku.html Another well explained tutorial: http://www.christianalfoni.com/articles/2015_04_19_The-ultimate-webpack-setup and a bootstrap project: https://github.com/cgreening/simple-webpack-react-starter/blob/master/package.json