In my react application, I'm trying to use react-lazy-load npm library inside my TableBody from material-ui.
I've also tried the react-infinite-scroll-component, but in both of them I get this error:
<tr> cannot appear as a child of <div>
which makes sense. Is there any way how can I use lazy loading in my table?
import LazyLoad from 'react-lazy-load';
import {Table, TableBody, TableCell, TableHead, TableRow} from '@material-ui/core';
<TableBody>
{users.map(user,i) =>
<LazyLoad key{i} height={68} offset={20}
<UserItem (**returns TableRow**)
(UserItem props)
>
</LazyLoad>
</TableBody>