我刚开始使用React,我希望在我的Django应用程序中使用不带Node.js的react-table。我已经用一个标准的unpkg链接将react-table库嵌入到我的应用程序中,但是当我在.js文件中使用它的函数时,我得到了像app.js:39 Uncaught ReferenceError: useTable is not defined这样的错误。所有的教程都是通过import { useTable } from 'react-table'导入useTable的,但是当你只是想在浏览器中实现这个提示时,这是不可能的。如果没有Node.js和它的import函数,我如何使用react-table?
发布于 2021-09-07 03:08:10
您可以使用unpkg将npm包作为脚本标记。
<script src="https://unpkg.com/browse/react-table@latest/react-table.min.js" />
源react表docs https://react-table.tanstack.com/docs/installation
https://stackoverflow.com/questions/69081658
复制相似问题