Skip to content

Instantly share code, notes, and snippets.

import React, { PropTypes } from 'react'
import { createStore } from 'redux'
import { Provider, connect } from 'react-redux'
import Router from 'react-router/BrowserRouter'
import Match from 'react-router/Match'
import Link from 'react-router/Link'
import { compose, getContext } from 'recompose';
const store = createStore((s = {}, a) => s)
@megamaddu
megamaddu / 1.js
Last active November 4, 2016 11:10 — forked from blittle/1.js
Comparison
const Pricing = React.createClass({
// ...
render() {
// ...
return (
<div className="pricing" style={{ opacity: purchasing ? 0.25 : '' }}>
{purchaseError ? (
<div className="purchase-complete">
<h2 style={{ color: 'hsl(10, 50%, 50%)' }}>Oops!</h2>
<p>
module Main where
import Control.Monad.Eff
import Data.Array (replicate, (!!), updateAt)
import Data.Maybe.Unsafe (fromJust)
import Data.Nullable (toMaybe)
import Prelude
import DOM.HTML (window)
import DOM.HTML.Document (body)
@megamaddu
megamaddu / rAF.js
Last active August 29, 2015 14:20 — forked from paulirish/rAF.js
rAF.js for node+browserify+babel
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
if (process.browser) {
let window = global.window;
let lastTime = 0;