React で useRef を使う際、型引数に HTMLAudioElement のような具体的な型名を指定してもよいが、React のユーティリティー型を使用して ElementRef<"audio"> のように書くこともできる

jay-esjay-es のブックマーク 2023/07/26 13:11

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

Strongly Type useRef with ElementRef

    Matt PocockMatt is a well-regarded TypeScript expert known for his ability to demystify complex TypeScript concepts. Using useRef with native elements can be a bit of a pain. You need to specify th...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう