应用程序在使用 react-table 时出现渲染错误

Application gives an Render error when using react-table

我尝试使用 React table 包创建一个基本的 table。但它给出了渲染错误。

这是我尝试过的方法 link https://codesandbox.io/s/react-table-example-nbmti?file=/src/Talbe.tsx

我在创建 table 时参考了这个例子 https://codesandbox.io/s/997mn?file=/src/index.tsx

在共享沙箱 link(即 https://codesandbox.io/s/react-table-example-nbmti?file=/src/Talbe.tsx)中,第 50 行,传递给 cell.render 方法的参数是 "cell".它的大小写不正确。它应该是 "Cell"

<td {...cell.getCellProps()}>{cell.render("Cell")}</td>

参考已共享的参考 link 中的第 72 行(即 https://codesandbox.io/s/997mn?file=/src/index.tsx