#frontend-tech

2018-02-01
jihchi 08:41:35
twitter
Published #immer 1.0.0 :tada::tada::tada: Exactly a month &amp; 2000:star: after very first version! Create immutable data structures with unprecedented ease &amp; full typechecking in <https://twitter.com/typescriptlang|@typescriptlang> / <https://twitter.com/flowtype|@flowtype> Vid: <https://egghead.io/lessons/redux-simplify-creating-immutable-data-trees-with-immer> Intro: <https://medium.com/@mweststrate/introducing-immer-immutability-the-easy-way-9d73d8f71cb3> Repo: <https://github.com/mweststrate/immer>
ggyy 09:21:47
@barrypeng6 has joined the channel
mrorz 10:02:39
GitHub
immer - Create the next immutable state by mutating the current one
  • ❤️1
jihchi 10:05:04
v.s.
jihchi 10:05:46
還蠻喜歡手稿的感覺
jihchi 10:05:57
很真實,可以感受作者情緒
mrorz 10:07:46
XDDD
mofas 12:56:27
有人改用immer實作了嗎
mofas 13:21:52
Medium
How we automatically generate a Sketch library for designers from our living style guide, and how our design systems journey led us here.
jihchi 13:26:58
immer 大家有討論過,蠻危險的..
jihchi 13:27:10
畢竟新人多的話,很容易 bug 多多
mofas 13:31:02
ㄎㄎ 還是繼續immutable
mofas 13:31:54
不過我記得每個人進來immutable 都卡很久. 會忘記啥時再操作POJO 啥時在做immutable
mrorz 13:49:30
用了 immer 的話,則是會有不小心在 `produce()` 外頭 mutate 到東西的風險
mrorz 13:50:07
不知道 dev mode 底下的 auto freeze 可以在開發階段抓到多少這種錯誤
jihchi 14:14:54
是喔!但是 immer 也是會有 ~一樣~ 類似但不一樣的問題啊
CY Li
不過我記得每個人進來immutable 都卡很久. 會忘記啥時再操作POJO 啥時在做immutable
2018-02-02
mofas 08:29:12
Recurse Center
Localhost is a series of monthly technical talks in NYC, open to the public, and given by members of the Recurse Center community.
mofas 08:29:38
Xi包子參戰
  • 🚨1
jihchi 08:44:39
twitter
:hospital: node-clinic: Automatically diagnose your <https://twitter.com/nodejs|@nodejs> performance issues and get actionable tips on how to improve it :heart_eyes::heart_eyes: My new favorite Node module :clap: <https://twitter.com/mafintosh|@mafintosh> <https://twitter.com/davidmarkclem|@davidmarkclem> <https://spectrum.chat/thread/1a6cbf7c-fbf4-4a98-a98f-64d082eefeac> <https://pbs.twimg.com/media/DU88Wt4WkAEHLkE.png>
jihchi 08:45:59
twitter
Just published Unstated 1.0! - Share state between components the same stateful component API - Easy to insert into any existing React app, try it out - Dependency injection for your tests - Super small library (140 lines of code) Give it a star: <https://github.com/thejameskyle/unstated> <https://pbs.twimg.com/media/DU8_sqSVAAA1H3d.jpg>
<https://pbs.twimg.com/media/DU9AIy8VAAE2JM1.jpg>
<https://pbs.twimg.com/media/DU9AKEiVMAUYUSq.jpg>
感覺比 createContext RFC 的還要好懂呢
喔 createContext 只有從上往下傳值,好像不會把 method 傳下去,所以其實原本 RFC 的 consumer 似乎無法改動 provider 給的值。

然後 unstated 則是可以在 provider 上面定義 method / callback,一起傳下去給下頭的 consumer (subscriber) 來呼叫

兩者都是對 react context 的封裝,但 unstated 比較能解決問題的感覺。
一種 redux 寫在 Provider 裡面的感覺
沒 redux 那麼複雜呢 XD

redux 的 action 發出去可以被很多個 reducer 聽到
但 unstated 就是一個 callback 直通特定 provider
開一個檔案 `store.js` 裡面放 `SingleSourceOfTrueContainer`,其他 component 需要的時候就 `import store from 'store.js'`
jihchi 10:09:41
裝了一下,速度很快,但是 editor 蠻吃 ecosystem 的.. 究竟能不能成功呢?
CY Li
Xi包子參戰
mrorz 10:10:11
感覺比 createContext RFC 的還要好懂呢
mrorz 10:16:44
喔 createContext 只有從上往下傳值,好像不會把 method 傳下去,所以其實原本 RFC 的 consumer 似乎無法改動 provider 給的值。

然後 unstated 則是可以在 provider 上面定義 method / callback,一起傳下去給下頭的 consumer (subscriber) 來呼叫

兩者都是對 react context 的封裝,但 unstated 比較能解決問題的感覺。
jihchi 10:17:30
一種 redux 寫在 Provider 裡面的感覺
mrorz 10:18:51
沒 redux 那麼複雜呢 XD

redux 的 action 發出去可以被很多個 reducer 聽到
但 unstated 就是一個 callback 直通特定 provider
jihchi 10:26:12
開一個檔案 `store.js` 裡面放 `SingleSourceOfTrueContainer`,其他 component 需要的時候就 `import store from 'store.js'`
mofas 10:40:41
現在Google就跟十年前的微軟一樣 推什麼什麼就失敗 只好去賣硬體
  • 🆘4
mofas 14:20:02
twitter
Last night I finished up writing the, 2017 recap, and, what to expect in 2018 content for the Frontend Developer Handbook. 2017 recap: <https://frontendmasters.gitbooks.io/front-end-developer-handbook-2018/content/recap.html> In 2018: <https://frontendmasters.gitbooks.io/front-end-developer-handbook-2018/content/2018.html> Hit me with feedback, updates, additions, and insults. Expecting all of the above.
2018-02-03
mofas 00:47:01
不知道大家還記不記得三四年前的famous framework.
mofas 00:47:36
那時候angular.js剛出大家開始把webview包成app, 但是performance很慢
mofas 00:47:59
所以那時famous 就搞了一個用js但是效能媲美native的framework
mofas 00:48:08
但是現在去他官網看 https://famous.co/
famous.co
The Famous Instant App cloud platform empowers brands to link their ad, social and email campaigns to instantly loading mobile app experiences.
mofas 00:48:17
已經變成接案公司了
  • 😢1
我還記得
之前嘗試用過一次,API 非常難用
手機硬體升級之後,根本沒有必要強迫開發者使用那麼難用的 API 來做開發
mofas 00:48:25
真是不勝唏噓 lol
jihchi 07:57:45
愛情與麵包⋯
Michael Hsu 14:15:29
然後是 react 做的
2018-02-04
jihchi 01:45:39
twitter
Good news for <https://twitter.com/apollographql|@apollographql> users, .graphql file imports will be supported in 2.0 of Create React App (which are better for performance): <https://github.com/facebook/create-react-app/pull/3909>
jihchi 01:55:04
twitter
Here’s some more clarifications from me. But really, please wait for the blog post, we’re working on it! :slightly_smiling_face: <https://www.reddit.com/r/reactjs/comments/7uur43/react_163_alpha_available_on_npm/dtoktoe/> <https://pbs.twimg.com/media/DVIO_xOUQAAoqfy.jpg>
2018-02-05
jihchi 09:06:30
twitter
<https://twitter.com/sharifsbeat|@sharifsbeat> just doing some <https://twitter.com/reasonml|@reasonml> merchan here :p, that is practically the default way to go with its pattern matching :nail_care:, and if you forget to handle a case it'll tell you, gets really powerful <https://pbs.twimg.com/media/DVI6sghWsAEiRDZ.jpg>
<https://pbs.twimg.com/media/DVI62klX4AAchye.jpg>
jihchi 10:03:12
GitHub
Cleaning up CSS Modules localIdentName in dev and prod configurations in an attempt to provide ease of use for developers in development and encourage best practices in production. Context and rati...
mrorz 14:09:35
我還記得
之前嘗試用過一次,API 非常難用
mrorz 14:10:31
手機硬體升級之後,根本沒有必要強迫開發者使用那麼難用的 API 來做開發
2018-02-06
jihchi 07:30:44
twitter
Inception! irmin-graphql can expose it's own git repo as a GraphQL API (or any other git repo). <https://github.com/andreas/irmin-graphql> <https://pbs.twimg.com/media/DVTHl5IX4AEKhbz.png>
jihchi 07:32:45
twitter
I just published “React’s :atom_symbol: new Context API” <https://blog.kentcdodds.com/reacts--new-context-api-70c9fe01596b>
jihchi 07:33:18
twitter
react-helmet-async: A concurrency-safe, drop-in replacement for react-helmet that works with streaming server-side rendering :heart_eyes::heart_eyes::heart_eyes: :clap: <https://twitter.com/wonderboymusic|@wonderboymusic> <https://spectrum.chat/thread/056d029c-99cc-4a54-889c-986497bc5646>
jihchi 08:49:46
twitter
Next.js 5.0 is here: ◆ Universal Webpack ◆ CSS imports + Typescript ◆ Zones ◆ Faster production builds <https://zeit.co/blog/next5>
  • 💪3
Universal webpack!
終於可以用 file-loader 了 QAQ
mrorz 10:23:48
Universal webpack!
終於可以用 file-loader 了 QAQ
mofas 12:40:57
Great article!
mofas 13:35:40
twitter
Runtime dependency injection is the worst thing ever and I really dislike that it is not more frowned upon in our industry. Especially in, supposedly, performance aware ecosystems.
  • 🔥1
mofas 13:37:49
擺明幹Angular的dependency Injectionㄇ
2018-02-07
mofas 03:16:47
耍寶二人組要開新平台for react
jihchi 08:40:54
twitter
PSA: Node.js 10.0.0 will contain first class support for fully promisified fs functions. <https://github.com/nodejs/node/pull/18297>
jihchi 08:52:31
twitter
"The Testing Trophy" :trophy: A general guide for the **return on investment** :money_mouth_face: of the different forms of testing with regards to testing JavaScript applications. - End to end w/ <https://twitter.com/Cypress_io|@Cypress_io> :black_circle: - Integration &amp; Unit w/ <https://twitter.com/fbjest|@fbjest> :black_joker: - Static w/ <https://twitter.com/flowtype|@flowtype> 𝙁 and <https://twitter.com/geteslint|@geteslint> ⬣ <https://pbs.twimg.com/media/DVUoM94VQAAzuws.jpg>
jihchi 10:07:26
GitHub
react-contextual - Tiny helper around Reacts new context API
jihchi 10:10:14
https://github.com/javivelasco/react-tunnels

`Breadcrumb` 蠻不錯的 example
GitHub
react-tunnels - :metro: Render React components in placeholders that are placed somewhere else in the component tree.
jihchi 15:09:46
https://github.com/facebook/create-react-app/issues/3815#issuecomment-363631534

`react-scripts@2.0.0-next.47d2d941` has been released.
GitHub
We have just released react-scripts@1.1.0 and, aside from critical vulnerabilities or similar issues, we intend this to be the last 1.x release. Our work on the 2.x release of react-scripts is in t...
jihchi 19:01:45
twitter
:admission_tickets: We’re super excited to finally announce the ticket sales! There are only a few early-bird tickets left so hurry and grab yours at <https://buff.ly/2E6BcPJ>
2018-02-08
mofas 08:00:09
code.visualstudio.com
See what is new in the Visual Studio Code January 2018 Release (1.20)
終於有multi file selection了
mofas 08:02:13
twitter
I just learned that you can connect Switch controllers to your computer via Bluetooth. So I decided I'll give my talk at <https://twitter.com/AwwwardsConf|@AwwwardsConf> this Friday using a joy con as a clicker :D <https://pbs.twimg.com/media/DVdu75GWsAAxC8N.jpg>
  • 😳1
  • 👍1
mofas 08:04:17
終於有multi file selection了
jihchi 11:12:30
GitHub
automerge - A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.
2018-02-09
jihchi 09:26:31
Medium
We’re very excited to announce the stable release of Rekit Studio, a complete IDE for React, Redux and React Router development!
jihchi 10:27:27
fictional.logdown.com
Lately, I have been involved in a pretty sizeable React-Redux application. A problem that arises ...
jihchi 10:29:34
上面這篇裡面的範例: https://codesandbox.io/s/5y09ny1y4 蠻不錯的
CodeSandbox
The online code editor tailored for web applications
mofas 11:30:06
npm rank
mofas 11:31:07
看到第一名的package我笑了
jihchi 11:35:45
https://www.npmjs.com/package/sindresorhus.js
```
sindresorhus.js
I got tired of having to manually install all his packages separately so I made one big package!

Fun Facts:
~2.27GB on disk
Takes about 6 minutes to install
```
XD
npm
Words cannot possibly describe this
jihchi 11:37:50
GitHub
Contribute to sindresorhus.js development by creating an account on GitHub.
mrorz 11:40:51
是狂熱粉絲呢 (?)
2018-02-10
mofas 03:06:08
hygen.io
Hygen - The scalable code generator that saves you time.
  • 👍2
mofas 03:06:16
前端也要來搞code generator啦~
mofas 03:06:33
話說之前我也搞過一個form code gen
mrorz 11:50:36
yeoman 不死
2018-02-11
mofas 01:53:44
Spectrum.chat
For a while now at ZEIT we've been using markdown-in-js as a pre-processor with Babel, so that we can write static documents more practically. In practice, our…
mofas 01:54:03
繼mjs之後又要有mdx
2018-02-12
mofas 10:22:03
https://www.youtube.com/watch?v=3DCeoCpTIAI
Dan on Microsoft youtube channel. 這啥組合
jihchi 10:27:04
攻城掠地
jihchi 13:43:29
https://www.youtube.com/watch?v=Up7LcbGZFuo ReasonML Discord 裡面有人分享的。還不錯。
jihchi 13:44:01
雖然是 F# 語言,但是概念可以套用到 Haskell、OCaml、ReasonML
2018-02-13
2018-02-14
mofas 03:48:59
Patreon
Become a patron of Sindre Sorhus today: Read posts by Sindre Sorhus and get access to exclusive content and experiences on the world’s largest membership platform for artists and creators.
mofas 03:49:11
Sindre 的狗狗很可愛
  • 🐶1
jihchi 14:48:50
beta.observablehq.com
Discover insights faster and communicate more effectively with interactive notebooks for data analysis, visualization, and exploration.
2018-02-16
mrorz 16:15:00
我覺得這個 VSCode plugin 很讚
在 `toMatchSnapshot` cmd+click 就可以跳到 snapshot 檔案
https://github.com/asvetliakov/typescript-snapshots-plugin
GitHub
typescript-snapshots-plugin - Snapshots language service support for Typescript
  • 💯2
mrorz 16:15:47
而且不像 vscode-jest 會一直幫你跑 test
燒 CPU 關都關不掉 囧
mrorz 16:16:21
只是想要 `.snap` 的 syntax highlighting 的話,裝上面這個就夠了~
jihchi 18:16:07
新年快樂
2018-02-17
itsmisscs 00:21:04
beta.observablehq.com
A better way to code.
我還以為跟 https://github.com/tc39/proposal-observable 有關

原來是所見即所得的意思呀 XD
mrorz 11:18:55
我還以為跟 https://github.com/tc39/proposal-observable 有關

原來是所見即所得的意思呀 XD
GitHub
proposal-observable - Observables for ECMAScript
jihchi 14:49:09
Context!
2018-02-18
jihchi 10:52:38
twitter
Just pushed a new site for MDX: JSX in Markdown. Thanks <https://twitter.com/rauchg|@rauchg> and <https://twitter.com/dan_abramov|@dan_abramov> for getting the word out there! <http://mdxc.reactarmory.com/>
2018-02-19
mofas 12:32:50
twitter
Updating to new context API if you only read context in render is even simpler than I imagined
2018-02-20
jihchi 20:05:09
twitter
Fun beginnings of a library inspired by <https://twitter.com/cerebraljs|@cerebraljs> tags. <https://github.com/tkh44/retarget> <https://pbs.twimg.com/media/DWdQd-VVoAANOla.jpg>
<https://pbs.twimg.com/media/DWdQmq1VoAA6pOa.jpg>
jihchi 20:06:59
twitter
3D iMac effect. Neeeaaattt. <http://www.thismanslife.co.uk/projects/lab/imac3d/>
  • 👍1
jihchi 20:07:51
twitter
Posted about it a few times but this could be a fun new project to contribute to: <https://github.com/babel/babel-upgrade> `npx babel-upgrade` Try it on your own or other people's projects, report issues, come up with your own suggestions, submit PRs! Help us try to automate what we can!
2018-02-22
jihchi 18:56:55
Critical Linux filesystem permissions are being changed by latest version · Issue #19883 · npm/npm · GitHub
https://github.com/npm/npm/issues/19883
GitHub
I'm opening this issue because: npm is crashing. npm is producing an incorrect install. npm is doing something I don't understand. Other (see below for feature requests): What's going wrong? ...
2018-02-23
mofas 05:01:45
twitter
:fire: .toLocaleString() is a great way to format currency <https://pbs.twimg.com/media/DWpl7K2VMAAqgJk.jpg>
jihchi 10:26:34
http://olafhartig.de/files/HartigPerez_WWW2018_Preprint.pdf
Semantics and Complexity of GraphQL
> ... In particular, we prove that the complexity of the GraphQL evaluation problem is NL-complete. ...
mofas 12:02:55
*Do not use npm 5.7*
2018-02-24
mofas 00:20:36
twitter
Understandning design feedback <https://pbs.twimg.com/media/DWspJUcV4AAZigX.jpg>
mofas 02:56:00
twitter
My latest Mac app is out: Gifski - Convert videos to high-quality GIFs. <https://github.com/sindresorhus/gifski-app> Made by <https://twitter.com/kornelski|@kornelski> and me.
ffmpeg ?
參數也太多 wwwwww
通常 `ffmpeg -i aaa.mp4 aaa.gif` 就夠了吧⋯⋯
好吧試了一下
不帶參數的話你會得到一個原始畫質、30fps 的超巨大 gif wwwwww
mofas 02:56:11
這超好用
mofas 11:46:04
twitter
Using a new strange API. I never felt this productive using React before. You’re going to hate it, then you’re going to love it. Will spill some beans in a week at <https://twitter.com/jsconfis|@jsconfis>
mofas 11:46:14
should be new context api
mrorz 13:44:58
ffmpeg ?
mrorz 13:45:56
superuser.com
I'm converting .flv movie to .gif file with ffmpeg. ffmpeg -i input.flv -ss 00:00:00.000 -pix_fmt rgb24 -r 10 -s 320x240 -t 00:00:10.000 output.gif It works great, but output gif file has a very...
mrorz 13:47:07
參數也太多 wwwwww
通常 `ffmpeg -i aaa.mp4 aaa.gif` 就夠了吧⋯⋯
mrorz 13:50:03
好吧試了一下
不帶參數的話你會得到一個原始畫質、30fps 的超巨大 gif wwwwww
mrorz 17:24:08
GitHub
pandora - A Manageable, Measurable and Traceable Node.js Application Manager represented by Alibaba powered by TypeScript
看起來像是 pm2 + keymetrics 的單機版,自架 keymetrics
mrorz 17:26:48
看起來像是 pm2 + keymetrics 的單機版,自架 keymetrics
jihchi 22:02:23
好期待 ~ _ ~
twitter
Using a new strange API. I never felt this productive using React before. You’re going to hate it, then you’re going to love it. Will spill some beans in a week at <https://twitter.com/jsconfis|@jsconfis>
2018-02-25
jihchi 00:55:27
GitHub
clooney - Clooney is an actor library for the web. Use workers without thinking about workers.
deniel 01:01:35
@deniel3678 has joined the channel
mofas 11:33:31
twitter
Yeah webpack 4.0.0 is on npm: <https://github.com/webpack/webpack/releases/tag/v4.0.0> In the next few days... * blog post * migration guide * docs update * compatible loaders and plugins published Keep in mind that it takes some time... many people are involved here (in their spare time, it's open source)
mofas 23:53:43
下面留言超好笑
mofas 23:54:02
"So ...... basically React Native?"
mofas 23:55:13
https://github.com/flutter/flutter#modern-reactive-framework
仔細一看 我以為是拿掉jsx改用bracket type annotation而已
GitHub
flutter - Flutter makes it easy and fast to build beautiful mobile apps.
mofas 23:59:47
不過flutter performance當然是更好
2018-02-26
mofas 00:00:21
他是fully compiled to native, no js bridge. Google搞compiler還是威猛
  • 😂1
  • 👍1
mofas 00:23:13
Medium
webpack 4 made some major improvements to the chunk graph and added a new optimiztion for chunk splitting (which is a kind of improvement…
jihchi 15:35:03
GitHub
reason-react-context - A library to add a context library for reason react
2018-02-27
jihchi 08:52:30
twitter
If you want to use your favorite lib in the Console, you can save the lib source in a Snippet, then run the Snippet whenever you need the lib. P.S. you can run also Snippets from the Command Menu by typing "!" followed by the Snippet name. <https://pbs.twimg.com/media/DWqW9n9U0AAiUBn.png>
mofas 09:03:59
Salesforce Developers Blog
There has been a ton of exciting news around developer tooling for Salesforce developers over the last few releases. Last year, we released the beta and GA of Salesforce DX tools which include the CLI, Salesforce Extensions for Visual Studio (VS) Code, scratch orgs, and more. This year, we’ve been heads-down on developer tooling with …