#frontend-tech
2019-03-04
mofas
08:14:58
overreacted.io
They’re a whole different Pokémon.
1
mrorz
2019-03-04 10:27:17
老實講我寫起來的感覺有點微妙,或許只是還沒習慣 ._.
`useCallback` 如果忘記列 dependency,會導致 callback 一直記著過去 function 的 closure,這應該就是 memory leak 了吧 orz
`useCallback` 如果忘記列 dependency,會導致 callback 一直記著過去 function 的 closure,這應該就是 memory leak 了吧 orz
mrorz
2019-03-04 10:29:32
我自己是覺得 hook 沒有很好讀。
這個 component 是一堆 checkbox,其中有些 checkbox 有 indeterminate state,所以有很多 handler。
我自己會覺得這種狀況底下好像寫成 class 會比較好讀。
https://github.com/answerfamily/ly/blob/master/src/components/LegislatorSections.js
這個 component 是一堆 checkbox,其中有些 checkbox 有 indeterminate state,所以有很多 handler。
我自己會覺得這種狀況底下好像寫成 class 會比較好讀。
https://github.com/answerfamily/ly/blob/master/src/components/LegislatorSections.js
jihchi
2019-03-04 22:36:59
各有優缺點,哪個好用就用哪個。這兩者不是各自的替代品。
mrorz
2019-03-07 10:31:29
nice!
mrorz
10:27:17
老實講我寫起來的感覺有點微妙,或許只是還沒習慣 ._.
`useCallback` 如果忘記列 dependency,會導致 callback 一直記著過去 function 的 closure,這應該就是 memory leak 了吧 orz
`useCallback` 如果忘記列 dependency,會導致 callback 一直記著過去 function 的 closure,這應該就是 memory leak 了吧 orz
mrorz
10:29:32
我自己是覺得 hook 沒有很好讀。
這個 component 是一堆 checkbox,其中有些 checkbox 有 indeterminate state,所以有很多 handler。
我自己會覺得這種狀況底下好像寫成 class 會比較好讀。
https://github.com/answerfamily/ly/blob/master/src/components/LegislatorSections.js
這個 component 是一堆 checkbox,其中有些 checkbox 有 indeterminate state,所以有很多 handler。
我自己會覺得這種狀況底下好像寫成 class 會比較好讀。
https://github.com/answerfamily/ly/blob/master/src/components/LegislatorSections.js
GitHub
平權立院鍵盤陳情. Contribute to answerfamily/ly development by creating an account on GitHub.
jihchi
22:36:59
各有優缺點,哪個好用就用哪個。這兩者不是各自的替代品。
2019-03-05
mofas
11:17:42
PSA: The latest Chrome Canary has removed support for web components
mofas
11:17:54
web components lose~~~~~
mrorz
11:18:11
wow
2019-03-07
mrorz
10:31:29
nice!
2019-03-08
mofas
03:58:06
nginxconfig.io
NGiИX configuration generator: HTTPS, HTTP2, CDN, PHP, HHVM, Frontend, Reverse proxy, Node.js, WordPress, Drupal, Magento, Python, Django, security headers, rate limiting, expiration by file types…![]()
- 💯1
2019-03-09
lunkai
08:02:38
@kaikaikai1219 has joined the channel
2019-03-11
2019-03-12
mrorz
17:20:27
https://blog.callstack.io/how-is-linaria-different-from-emotion-42e420a3984f
https://github.com/callstack/linaria/blob/master/docs/BENEFITS.md
我覺得 Linaria 做得到跟 emotion 差不多的事情(API 根本照抄ㄏㄏ),但又 zero runtime 這點滿猛的
唯一問題大概就是不能跟 CRA 一起用:
https://github.com/callstack/linaria/issues/308#issuecomment-462164541
但如果沒在用 CRA 的話感覺好像可以試試看
https://github.com/callstack/linaria/blob/master/docs/BENEFITS.md
我覺得 Linaria 做得到跟 emotion 差不多的事情(API 根本照抄ㄏㄏ),但又 zero runtime 這點滿猛的
唯一問題大概就是不能跟 CRA 一起用:
https://github.com/callstack/linaria/issues/308#issuecomment-462164541
但如果沒在用 CRA 的話感覺好像可以試試看
Callstack Engineers
Recently we released our CSS in JS library - Linaria, which does build time evaluation and extraction of CSS to static files. We’ve been…![]()
1
2019-03-16
jihchi
10:16:37
GitHub
We are planning to release Create React App version 3.0 soon. This will be a relatively small release but will include a number of necessary breaking changes. Planned Features Jest 24: #6278 Hooks ...
2019-03-18
mofas
07:07:50
mrorz
11:44:16
overreacted 每一篇都好重要,但好長 orz
2019-03-19
mofas
11:03:59
"In the JavaScript community, there are a few strict opinionated style guides enforced by a linter. My personal observation is that they tend to create more friction than they’re worth. I can’t count how many times somebody showed me some absolutely valid code and said “React complains about this”, but it was their lint config complaining! This leads to three issues:"
mofas
11:04:19
That is why I don't like to use lint tool too much.
mrorz
11:13:46
現在我們都 prettier 說的算,eslint 只裝檢查 import / unused variable 的,不裝 airbnb
https://github.com/answerfamily/answerfamily-web/blob/master/.eslintrc.js
https://github.com/answerfamily/answerfamily-web/blob/master/.eslintrc.js
GitHub
我愛家我解惑網站. Contribute to answerfamily/answerfamily-web development by creating an account on GitHub.
jihchi
18:42:20
有些不是 coding style 還蠻好用,像是 unused variable 之類
2019-03-26
mofas
04:08:44
mofas
04:08:59
Dan can write faster than you can read.
uufrienduu
21:16:09
@uufrienduu has joined the channel
mofas
23:08:15
jihchi
2019-03-27 09:26:52
Cool! UI for Jest!
2019-03-27
jihchi
09:26:52
Cool! UI for Jest!