React Table
軽量な/icons/react.icon用table library
zero design
自分で自由に決められる
libraryには最低限の機能しかない。あとは全部自分で実装する
React Table - Hooks for building lightweight, fast and extendable datagrids for React
demoが豊富
見た限り、値の編集やdrag&dropもできるようだ
React Hooksというのを使っているらしい
tannerlinsley/react-table
star数が10k越えてる
Hooks対応したreact-tableをTypeScriptで使う · nametake.info
使い方
ひと通り実装の流れが決まっている
欠点
/icons/typescript.iconの型定義ファイルがない
正確に言うと@types/react-tableはあるのだが、自分でcustomizeして使う必要がある
1. @types/react-tableをinstall
2. このREADME.mdにあるreact-table-config.d.tsをコピペしてsrc/@typesに放り込む
使いたいpluginをextendsに適用する
例:
Hooks対応したreact-tableをTypeScriptで使う · nametake.info
他の方法:
see react-tableをTypescriptで使うために、index.d.tsを再定義。 - Qiita
関連post
reactjs - Something went wrong with react table using typescript - Stack Overflow
型を使って本格的なtableを作るときは、このcodesandboxが参考になる
https://codesandbox.io/s/github/ggascoigne/react-table-example
ただし解読にかなり時間を要すると思われる
自分で1から作ったほうが早いかも知れない
#React.js
#2020-11-29 23:02:15
#2020-11-21 11:08:35
#2020-11-12 16:22:09