摘要:
Take away:Always check you ruturn the accumulatorAlways pass in the inital valuevar data = ["vote1", "vote2", "vote1", "vote2"];var reducer = function... 阅读全文
摘要:
Sometimes we need to turn arrays into new values in ways that can't be done purely by passing an accumulator along with no knowledge about its context... 阅读全文
摘要:
Learn how to use Object.assign() and the spread operator proposed for ES7 to avoid mutating objects./* * Open the console to see * that the tests have... 阅读全文
摘要:
Learn how two common array functions - map() and filter() - are syntactic sugar for reduce operations. Learn how to use them, how to compose them, and... 阅读全文
摘要:
For Redux, you cannot use mutable methods like push, splice. Need to use immutable methods such as concat, slice and ...spreadHtml: JS Bin push(... 阅读全文
摘要:
Currying is a core concept of functional programming and a useful tool for any developer's toolbelt.Example 1:let f = a => b => c => a+b+c;let result ... 阅读全文
摘要:
Array slice creates a shallow copy of an array. In this lesson we cover, in detail, exactly what a 'shallow' copy is and how it can trip people up. We... 阅读全文
摘要:
Before you use the React Redux bindings, learn how to create a complete simple application with just React and Redux. JS Bin const counter = ... 阅读全文