摘要: 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 阅读(1222) 评论(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 阅读(220) 评论(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 阅读(369) 评论(0) 推荐(0)