#author("2023-09-09T15:36:34+09:00","default:ryuichi","ryuichi")
#author("2023-09-09T15:37:35+09:00","default:ryuichi","ryuichi")
* 何回目のレンダリングか調べる [#l042a669]

  const renderCount = useRef(0);
  
  useEffect(() => {
    renderCount.current += 1;
    console.log(`${renderCount.current} ren ` + new Date().toISOString());
  });
 const renderCount = useRef(0);
 
 useEffect(() => {
   renderCount.current += 1;
   console.log(`${renderCount.current} ren ` + new Date().toISOString());
 });

- refを使う

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS