Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table doesn’t re-render with new React Compiler + React 19 #5567

Open
2 tasks done
erikshestopal opened this issue May 18, 2024 · 10 comments
Open
2 tasks done

Table doesn’t re-render with new React Compiler + React 19 #5567

erikshestopal opened this issue May 18, 2024 · 10 comments

Comments

@erikshestopal
Copy link

TanStack Table version

v8.17.3

Framework/Library version

React 19 + React Compiler

Describe the bug and the steps to reproduce it

In the repo provided, run bun install and then bun dev.

Then, add some text to the input and click add. Observe that the table doesn’t re-render when the data passed in has changed (table.getRowModel().rows doesn’t seem to be updated).

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://github.com/erikshestopal/react-compiler-bug/blob/a92305ca44ee81b6d7ece76c96aacf163fe83970/src/App.tsx#L38

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

None

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
@jonahallibone
Copy link

This is unsurprising. This library (which I love) has been complicated to optimize since at least v7. They core instance returned from useReactTable doesn't rerender as one would expect in React, which means that the memoiziation that the compiler applies certainly breaks this library. I wouldn't expect a fix until v9.

@yongsk0066
Copy link

I am also having difficulty applying the compiler due to the same issue. I am concerned that other libraries might have similar issues, making the application of the compiler worrisome.

@SaveliiLukash
Copy link

Same exact issue.
We'll have to stick with "use no memo" directive for now for our table component.

@KevinVandy
Copy link
Member

Yep, use no memo on table components for now. A v9 alpha branch was recently created where we will focus on version bumping the peer dependencies for each framework that needs it.

@izakfilmalter
Copy link

Seems like doing the following solves it for me: TanStack/virtual#743

@ssynowiec
Copy link

I've the same problem with Next.js 15 & React 19 & Tanstack Table 8.20.5

use no memo in table component solves the problem.

@robahtou
Copy link

robahtou commented Oct 3, 2024

Same here. After hours of searching for a solution use no memo FTW

@victormanuelfrancodev
Copy link

sorry how is use no memo? how can I implement that?

@kbumsik
Copy link

kbumsik commented Oct 29, 2024

@victormanuelfrancodev Just add "use no memo" on top of your file

@dezerb
Copy link

dezerb commented Nov 7, 2024

I have some issues event with
use no memo
while without this trick the table body remains empty, than with it it renders the first content but dosen't get rerender

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests