zebrahondje
zebrahondje
Try `npm i @types/[email protected]`
Works fine here. I don't see any TypeScript in your example. What's in `src/components/pages/home/index.tsx`?
> ... Leaving open as this should have given a type error at compile-time, no? Well, you get a `TypeError` telling you that the `component` is `null`, right?
https://www.npmjs.com/package/react-table-6#server-side-data
You're trying to `import ReactTable from 'react-table'`, that's not gonna work, buddy. Checkout the most basic example: https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/basic
Have a look at this example: https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/column-hiding
Then have a look at this hook: https://github.com/tannerlinsley/react-table/blob/master/src/hooks/useColumnVisibility.js As you can see there are a couple of functions passed into the instance with which you can control the column visibility.
Well that's one way, but it looks like you're trying to fit a React lifecycle method into a React effect hook. Using the following piece of code would achieve the...
As you are manually controlling pagination the only data that is fetched is the first page. So `react-table` never knows how many rows there are in total. That's why you...
A function to calculate the pageCount needs two variables: `totalRows` and `pageSize`. `pageSize` won't be an issue, but where would you get `totalRows` from? That needs to come from the...