Autodesk / Autodesk/react-base-table

rowRenderer invalid hooks error

オープン
#312 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
1.5k
フォーク
170
PR マージ指標
30日以内にマージされた PR はありません

説明

I used rowRenderer for my custom row component and ı need to use useEffect hooks inside this component but ı got Invalid hook call error.
```jsx
...

{({ width, height }) => (
}
rowRenderer={EventRow}
rowHeight={84}
/>
)}

...
```

if ı use the hooks inside ***EventRow*** component ı got ***react.development.js:1476 Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component.*** error.
***EventRow*** is a functional component.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、EventRow とその useEffect フックを使って、提供された AutoResizer/Table の例を再現します。rowRenderer が EventRow をどのように呼び出しているかを調べ、それを React の関数コンポーネントにおけるフックの要件と比較します。EventRow が Invalid hook call エラーを発生させずにフックを使用できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。