Skip to content

Instantly share code, notes, and snippets.

View nevzatalkan's full-sized avatar

Nevzat ALKAN nevzatalkan

View GitHub Profile
@ustun
ustun / reducer_as_immutable_class.js
Created February 6, 2017 09:56
redux reducer from immutable class
var camelCase = require('lodash.camelcase');
const {Map, Record, List} = require('immutable');
class Todo extends Record({ description: null, completed: false }) {
toggle() {
return this.set('completed', !this.completed);
}
}
const InitialTodoApp = Record({