上一页 1 ··· 268 269 270 271 272 273 274 275 276 ··· 498 下一页
摘要: As an alternate to useState, you could also use the useReducer hook that provides state and a dispatch method for triggering actions. In this lesson, 阅读全文
posted @ 2019-02-24 17:28 Zhentiw 阅读(450) 评论(0) 推荐(0)
摘要: A pointed functor is a functor with an of method What's important here is the ability to drop any value in our type and start mapping away. The benifi 阅读全文
posted @ 2019-02-23 19:37 Zhentiw 阅读(220) 评论(0) 推荐(0)
摘要: We will see a peculiar example of a pure function. This function contained a side-effect, but we dubbed it pure by wrapping its action in another func 阅读全文
posted @ 2019-02-23 19:28 Zhentiw 阅读(255) 评论(0) 推荐(0)
摘要: An introduction to concatting items via the formal Semi-group interface. Semi-groups are simply a type with a concat method that are associative. We d 阅读全文
posted @ 2019-02-22 17:17 Zhentiw 阅读(231) 评论(0) 推荐(0)
摘要: It is really important to understand function signature in functional programming. The the code example below: 'map' is pointfree version of any founc 阅读全文
posted @ 2019-02-22 04:45 Zhentiw 阅读(258) 评论(0) 推荐(0)
摘要: In the class version of this component, we had a method called safeSetState which would check whether the component was still mounted before trying to 阅读全文
posted @ 2019-02-21 01:23 Zhentiw 阅读(866) 评论(0) 推荐(0)
摘要: Transducers are composable algorithmic transformations. They are independent from the context of their input and output sources and specify only the e 阅读全文
posted @ 2019-02-20 20:54 Zhentiw 阅读(298) 评论(0) 推荐(0)
摘要: Thanks to react-testing-library our tests are free of implementation details, so when we refactor components to hooks we generally don't need to make 阅读全文
posted @ 2019-02-19 22:53 Zhentiw 阅读(1223) 评论(0) 推荐(0)
摘要: Maybe has two types: Just / Nothing. Just() will just return the value that passed in. Nothing returns nothing... Just/ Nothing are both functors, the 阅读全文
posted @ 2019-02-19 16:45 Zhentiw 阅读(225) 评论(0) 推荐(0)
摘要: We refactor a function that uses try/catch to a single composed expression using Either. We then introduce the chain function to deal with nested Eith 阅读全文
posted @ 2019-02-19 01:40 Zhentiw 阅读(370) 评论(0) 推荐(0)
上一页 1 ··· 268 269 270 271 272 273 274 275 276 ··· 498 下一页