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 · 4 comments
Open
2 tasks done

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

erikshestopal opened this issue May 18, 2024 · 4 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.

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

No branches or pull requests

5 participants