T
TanStack•4w ago
ambitious-aqua

Page Erorr on trying to live query a tanstack db collection (tanstack start)

the code is a little more than to fit here so here a github gist link https://gist.github.com/Bukharee/eed62369e19baef3013caf603f3833bd but when i open tha page in the browser i get Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem. i cant figure out where things went wrong cc: @Manuel Schiller or anyone on the tanstack db team
Gist
Tanstack start and db problem
Tanstack start and db problem . GitHub Gist: instantly share code, notes, and snippets.
Rules of Hooks – React
The library for web and native user interfaces
4 Replies
ambitious-aqua
ambitious-aquaOP•4w ago
Someone please 🙏 take a look at this and help @Jack Herrington (jherr)
wise-white
wise-white•4w ago
please provide a complete reproducer project also dont just tag people
ambitious-aqua
ambitious-aquaOP•4w ago
Sorry for the inconvenience! What do you need the code snippet is on gist, I can give you access to the repo it’s a monorepo with express and a Tanstack start
passive-yellow
passive-yellow•4w ago
We need a small, reproducable error logged as an issue. It sounds like you have an extensive setup. That's not workable for OSS maintainers. We don't have the time to set up your full configuration. You are going to need to do the pre-work to figure out what the minimal reproducible example (MRE) is. https://stackoverflow.com/help/minimal-reproducible-example
Stack Overflow
How to create a Minimal, Reproducible Example - Help Center
Stack Overflow | The World’s Largest Online Community for Developers

Did you find this page helpful?