I have a rather simple question on using react-table from React.js.
I cannot find any samples nor documents regarding useMemo for a local json, pretty much all of the tutorials are based on asyn api.
The objective is to create a table as such: https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/pagination?file=/src/App.js
The only difference between the tutorial and mine, is the makeData file would be an actual json file with legit data.
This is what I tried:
const data = React.useMemo(() => Sales, [])
which obviously did not work, and sent back TypeError: Cannot read property 'forEach' of undefined.
How should I approach this?