Skip to content

Instantly share code, notes, and snippets.

@duncan60
duncan60 / example 1
Last active December 22, 2015 06:54
es7 immutable
let NBA = {
season : {
year : '2017',
start: '2016-10',
end : '2017-6',
state: 'active'
},
players: [
{
name : 'duncan',
@duncan60
duncan60 / redux demo js
Last active January 7, 2016 11:06
redux practice
//https://egghead.io/lessons/javascript-redux-the-single-immutable-state-tree
//redux
const createStore = (reducer, initialState) => {
let state = initialState;
let listeners = [];
const getState = () => state;
const dispatch = (action) => {
state = reducer(state, action);