HackerTrans
トップ新着トレンドコメント過去質問紹介求人

wingspan

no profile record

投稿

Early gunpowder was made from the 'pisse' of church ladies

chicagoreader.com
4 ポイント·投稿者 wingspan·11 か月前·0 コメント

Please Stop Using Barrel Files

tkdodo.eu
5 ポイント·投稿者 wingspan·2 年前·1 コメント

コメント

wingspan
·4 年前·議論
I was able to reproduce this in a simple example [1]. If you refresh it a few times you will be able to see it flash (at least I did in Chrome on Mac). It is probably more noticeable if you set it up as an SPA with a page transition, but I wanted to keep the example simple.

[1] https://codesandbox.io/s/recursing-glitter-h4c83u?file=/src/...
wingspan
·4 年前·議論
I love this approach and have used it many times in JavaScript. I often end up adding an additional map in front with the resolved values to check first, because awaiting or then'ing a Promise always means you will wait until the next microtask for the value, instead of getting it immediately. With a framework like React, this means you'll have a flash of missing content even when it is already cached.