javascript – React-Table useTable is not defined (no Node.js)

I’m building a React app without Node.js and am using react-table. However, I keep getting this error when using this code snippet from the demo:

function Table({columns, data}) {
    // Use the state and functions returned from useTable to build your UI
    const {
        getTableProps,
        getTableBodyProps,
        headerGroups,
        rows,
        prepareRow,
    } = useTable({
        columns,
        data,
    })
...
Uncaught ReferenceError: useTable is not defined

My JS files are:

<script type="application/javascript" src="https://unpkg.com/babel-standalone@6.26.0/babel.js"></script>
<script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<script crossorigin src="//unpkg.com/react-is/umd/react-is.production.min.js"></script>
<script crossorigin src="https://unpkg.com/styled-components/dist/styled-components.min.js"></script>
<script src="https://unpkg.com/react-table@7.7.0/dist/react-table.development.js" crossorigin></script>

I’ve read that this issue resolves with react-table version 7.7.0 but this is the exact version I’m using.

Read more here: Source link