(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
( function( window, undefined ) { | |
'use strict'; | |
// helper function | |
function capitalize( str ) { | |
return str.charAt(0).toUpperCase() + str.slice(1); | |
} | |
// ========================= getStyleProperty by kangax =============================== |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
function JSON_to_URLEncoded(element,key,list){ | |
var list = list || []; | |
if(typeof(element)=='object'){ | |
for (var idx in element) | |
JSON_to_URLEncoded(element[idx],key?key+'['+idx+']':idx,list); | |
} else { | |
list.push(key+'='+encodeURIComponent(element)); | |
} | |
return list.join('&'); | |
} |
var express = require('express'); | |
var app = express(); | |
var mongo = require('mongodb'); | |
var MongoClient = require('mongodb').MongoClient; | |
var GridStore = mongo.GridStore; | |
var ObjectID = require('mongodb').ObjectID; | |
function StreamGridFile(req, res, GridFile) { |
h('div.container', [ | |
h('label.nameLabel', 'Name:'), | |
h('input.myinput', {attributes: {type: 'text'}}), | |
h('hr'), | |
h('h1.greeting', `Hello ${name}`) | |
]) | |
// or | |
div('.container', [ |
This is a proposal for a lightning talk at the Reactive 2016 conference.
NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut! You could also Retweet if you want :)
JavaScript is a dynamic language, and there's nothing wrong with that. It allows quick iteration and lowers barriers. However, sometimes some compile-time type checking is just what you need to keep your code in line and give yourself the confidence to build bigger and faster. Flow gives the best of both worlds. You can have normal JavaScript but you can also add types where they're helpful, and it adds zero cost at runtime. In this talk I'll show Flow as it applies to a Redux & React codebase.