other-emerald
other-emeraldโ€ข2y ago

useTable from refine-react-table is killing my IDE

Hi! I'm using refine with the new mantineUI integration. I'm trying to get a list working for some easy entities, but as soon as I import useTable from the @pankod/refine-react-table (copying an example from the official repo https://github.com/pankod/refine/blob/next/examples/authentication/mantine/src/pages/posts/list.tsx) my IDE (jetBrains WebStorm) takes at least 30 seconds to complete each post-save action (only import optimization and reformat with prettier). If i remove the useTable import, it goes back to instant post-save actions as always.. Any guess?
36 Replies
Omer
Omerโ€ข2y ago
Hey @kino90 ๐Ÿ‘‹ , Welcome, we are glad to see you! Very interesting. So, are you experiencing the same issue in this example? https://github.com/pankod/refine/blob/next/examples/table/reactTable/basic/src/pages/posts/list.tsx
other-emerald
other-emeraldโ€ข2y ago
let me try ๐Ÿ™‚
other-emerald
other-emeraldโ€ข2y ago
I don't know how to reproduce this on your monorepo. I'm getting this error even if i installed deps both in the main repo folder and in the example :/
No description
Omer
Omerโ€ข2y ago
just copy/paste the page into your project. So you can easily try
other-emerald
other-emeraldโ€ข2y ago
ah ok in my project ๐Ÿ™‚
Omer
Omerโ€ข2y ago
We just want to be sure if it's about the "@pankod/refine-mantine" package or the "@pankod/refine-react-table" package ๐Ÿ‘€
other-emerald
other-emeraldโ€ข2y ago
Done, it's definetely the useTable from "@pankod/refine-react-table"
Omer
Omerโ€ข2y ago
other-emerald
other-emeraldโ€ข2y ago
if i save with import { useTable, ColumnDef, flexRender } from "@pankod/refine-react-table"; it freezes everything for 30sec more or less, if I save with import { ColumnDef, flexRender } from "@pankod/refine-react-table"; (without useTable) it's instant `
Omer
Omerโ€ข2y ago
Could you try this?
import {
createColumnHelper,
flexRender,
getCoreRowModel,
useReactTable,
} from '@tanstack/react-table'
import {
createColumnHelper,
flexRender,
getCoreRowModel,
useReactTable,
} from '@tanstack/react-table'
other-emerald
other-emeraldโ€ข2y ago
using this (and using useReactTable instead of useTable) saves quickly
Omer
Omerโ€ข2y ago
Thanks. Let's see what we can do ๐ŸŽ
other-emerald
other-emeraldโ€ข2y ago
Thanks a lot ๐Ÿ‘
Omer
Omerโ€ข2y ago
I guess I couldn't reproduce the issue ๐Ÿ˜ฆ
other-emerald
other-emeraldโ€ข2y ago
No description