(credit: @tomo_e さん)
- Sho Miyamoto / @webseals
- 新卒 2 年目
- ウェブチーム
jsprimerというJavaScriptの書籍を書いている。 これを書いてるときに参考にしているものを書いていく。
ECMAScriptのLiving Standardな仕様書ページ。 スナップショットなECMAScriptの仕様書ページもあるけど、基本的にはLiving Standardの方しか見てない。
If you use server rendering, keep in mind that neither useLayoutEffect
nor useEffect
can run until the JavaScript is downloaded.
You might see a warning if you try to useLayoutEffect
on the server. Here's two common ways to fix it.
If this effect isn't important for first render (i.e. if the UI still looks valid before it runs), then useEffect
instead.
function MyComponent() {
Copyright © <year>
<copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
📝 企業を調べる時のメモ書きです。
この記事は https://medium.com/@ryardley/react-hooks-not-magic-just-arrays-cd4f1857236e の日本語訳です。途中で力尽きて雑な翻訳になってる箇所がいくつかあります。
私は、新しい Hooks の API の "magic" な挙動に悩んでいる人が結構いると聞いています。なのでこの構文の提案が、少なくとも表面的なレベルではどう動いているか、解説してみようと思います。
// Builderオブジェクトの型 | |
type Builder<Props, Result> = ({} extends Props | |
? { | |
build: () => Result; | |
} | |
: {}) & | |
{ [P in keyof Props]-?: SetFunction<Props, P, Result> }; | |
type SetFunction<Props, K extends keyof Props, Result> = ( | |
value: Exclude<Props[K], undefined> |
Feel free to contact me at [email protected] or tweet at me @statisticsftw
This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!
It assumes some knowledge of AWS.