JSXはspread演算子で<Foo a={a} b={b}>を<Foo {...{a, b}}>で書ける
const fmt = new Intl.NumberFormat("ja-JP",{ notation: "compact", }) fmt.format(BigInt(64 ** 8) ) // => "281兆" とりあえずざっくり数値を出したいときにとても便利。最高そう。 オプションを組み合わせる 詳しくは上記MDNが詳しいが、その他オプションと組み合わせることで色々調整も可能だ // 何も設定しないといい感じに小数点計算してくれる new Intl.NumberFormat("ja-JP",{ notation: "compact"}).format(BigInt(433333333)) // => "4.3億" // 小数点表記をさせたくなければmaximumFractionDigitsを0にする new Intl.NumberFormat("ja-JP",{ notation
const { isLoading, error, data } = useQuery('repoData', () => fetch('https://api.github.com/repos/tannerlinsley/react-query').then(res => res.json() ) ) 一見、ほとんど一緒じゃん、となるが、SWRは「キーをfetcheの実行するためのパラメータ」になっている。 一方、react-queryは「キーと実行APIは独立している」。これはイメージとしてReduxのActionなどのconstantのような印象を受ける APIの違い Core API RQ : https://react-query.tanstack.com/docs/api SWR https://swr.vercel.app/docs/options#parameters これ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く