TanStackT
TanStackโ€ข3y ago
verbal-lime

Errors while using query in combination with table's subComponent ft.

Hey ๐Ÿ‘‹๐Ÿฝ
here's a codesandbox showing the issue:

https://codesandbox.io/p/devbox/subcomponentwithquery-5h5tct?embed=1&file=%2Fsrc%2Fmain.tsx%3A3%2C27

If I click on a row to open the subComponent, where a
useQuery
-hook is used to load a post, I get following errors:

React has detected a change in the order of Hooks called by Table. This will lead to bugs and errors if not fixed.


I tried to reproduce the error in a sandbox. Similar code in a vite.js react app fails with:

Warning: Internal React error: Expected static flag was missing. Please notify the React team.


Please can you help me?
Thanks
Was this page helpful?