frontend-tech

Month: 2020-07

2020-07-01

2020-07-06

Kevin Hsu 10:17:02
@mattandkevin1060 has joined the channel

2020-07-07

2020-07-10

2020-07-13

mofas 05:24:24
Holy.
mofas 05:25:12
用text generator 已經可以gen 出react component不稀奇
mofas 05:25:22
可以gen 出Q&A 的答案
mrorz 16:39:46
(Expected) error handling on GraphQL using union types

2. 我自己現在的 Graphql mutation 結果設計是用前 <https://medium.com/@sachee/200-ok-error-handling-in-graphql-7ec869aec9bc|medium> 的設計延伸的,所有的操作不是權限跟 input 格式問題的話,都統一回傳 &lt;Mutation&gt;Result 。 Result 是 錯誤 Type 跟 成功結果的 union。 ```Type Reply {...} interface UserError { message: String! } Type IsBlockedError extend UserError { message: String! // other props you want to show } union UpdateReplyResult = Reply | IsBlockedError Mutation { updateReply(input: UpdateReplyInput!): UpdateReplyResult! }```

2020-07-21

jihchi 21:13:58
https://www.boringcactus.com/2020/07/18/monads-without-the-bullshit.html|https://www.boringcactus.com/2020/07/18/monads-without-the-bullshit.html

boringcactus.com

Monads, Explained Without Bullshit

there’s a CS theory term, “monad,” that has a reputation among extremely online programmers as being a really difficult to understand concept that nobody knows how to actually explain. for a while, i thought that reputation was accurate; i tried like six times to understand what a monad is, and couldn’t get anywhere. but then a friend sent me Philip Wadler’s 1992 paper “Monads for functional programming” which turns out to be a really good explanation of what a monad is (in addition to a bunch of other stuff i don’t care about). so i’m gonna be repackaging the parts i like of that explanation here.