{"provider_name":"Hatena Blog","description":"\u5916\u5074\u304b\u3089\u53d7\u3051\u53d6\u3063\u305fref\u3068\u306f\u5225\u306b\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5185\u90e8\u3067\u5b9a\u7fa9\u3057\u305fref\u3082\u4e00\u7dd2\u306b\u5b50\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u6e21\u3057\u305f\u3044\u5834\u5408\u3092\u8abf\u3079\u305f \u8abf\u3079\u305f\u3068\u3053\u308d\u3001\u30ab\u30b9\u30bf\u30e0hook\u3067\u4f5c\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f useMergeRef\u3068\u3044\u3046\u540d\u3067\u3088\u304futil\u3068\u3057\u3066\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\u6a21\u69d8 \u5b9f\u88c5\u4f8b\uff1a import { useCallback } from 'react'; function useMergeRef<T>(...refs: Array<React.Ref<T> | undefined>) { return useCallback((node: T | null) => { refs.forEach(ref => { if (!ref)\u2026","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fuga-box.hatenablog.com%2Fentry%2F2024%2F12%2F24%2F000000\" title=\"\u3010React\u3011\u8907\u6570\u306euseRef\u3092\u307e\u3068\u3081\u305f\u3044 - UGA Boxxx\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","author_name":"uggds","title":"\u3010React\u3011\u8907\u6570\u306euseRef\u3092\u307e\u3068\u3081\u305f\u3044","url":"https://uga-box.hatenablog.com/entry/2024/12/24/000000","blog_url":"https://uga-box.hatenablog.com/","published":"2024-12-24 00:00:00","version":"1.0","categories":["React"],"height":"190","width":"100%","author_url":"https://blog.hatena.ne.jp/uggds/","image_url":null,"blog_title":"UGA Boxxx"}