上一页 1 ··· 314 315 316 317 318 319 320 321 322 ··· 494 下一页
摘要: In this lesson we will refactor an existing UI update from a typical loading approach to an optimistic UI updateapproach to give our users a faster, m 阅读全文
posted @ 2018-01-22 17:48 Zhentiw 阅读(271) 评论(0) 推荐(0)
摘要: In Javascript, all function arguments are optional by default. That means if you ever forget to pass a critical parameter, the code will just fail wit 阅读全文
posted @ 2018-01-22 17:35 Zhentiw 阅读(279) 评论(0) 推荐(0)
摘要: Transducers remove the requirement of being lazy to optimize for things like take(10). However, it can still be useful to "bind" a collection to a set 阅读全文
posted @ 2018-01-17 21:44 Zhentiw 阅读(220) 评论(0) 推荐(0)
摘要: A frequent use case when transducing is to apply a transformation to items without changing the type of the collection. In this lesson, we'll create a 阅读全文
posted @ 2018-01-17 20:52 Zhentiw 阅读(232) 评论(0) 推荐(0)
摘要: Our transduce function is powerful but requires a lot of boilerplate. It would be nice if we had a way to transduce into arrays and objects without ha 阅读全文
posted @ 2018-01-17 20:24 Zhentiw 阅读(174) 评论(0) 推荐(0)
摘要: Let's you have $10000, and you inverst 4 stocks. ['SPY', 'IBM', 'XOM', 'GOOG']. The allocation is [0.4, 0.4, 0.1, 0.1] separately. The way to calculat 阅读全文
posted @ 2018-01-17 20:02 Zhentiw 阅读(325) 评论(0) 推荐(0)
摘要: So far we've been transducing by manually calling .reduce() on arrays, but we want to be able to transduce over other collection types as well. In thi 阅读全文
posted @ 2018-01-16 20:23 Zhentiw 阅读(238) 评论(0) 推荐(0)
摘要: To make our composition more readable and easier to name we are going to ceate a compose function we can use to avoid having to manually nest our tran 阅读全文
posted @ 2018-01-16 17:44 Zhentiw 阅读(207) 评论(0) 推荐(0)
摘要: React is great for diffing between Virtual-DOM and rendering it to the dom. It also offers a naïve solution for diffing state in terms of setState. Ho 阅读全文
posted @ 2018-01-15 01:25 Zhentiw 阅读(267) 评论(0) 推荐(0)
摘要: Immer is a tiny library that makes it possible to work with immutable data in JavaScript in a much more straight-forward way by operating on a tempora 阅读全文
posted @ 2018-01-15 01:16 Zhentiw 阅读(274) 评论(0) 推荐(0)
上一页 1 ··· 314 315 316 317 318 319 320 321 322 ··· 494 下一页