T
TanStack•6mo ago
genetic-orange

Loader called twice on the server, cause = "enter" and "stay"

Is it intended that the loader is called twice for a very minimal setup? Queries are deduplicated using tanstack query in my setup, but for instance I have a server function outside tanstack query that is being called twice. The loader is called twice on the server with cause = "enter" first and then "stay"?
8 Replies
genetic-orange
genetic-orangeOP•6mo ago
to clarify, this is on the initial load and not preloaded
genetic-orange
genetic-orange•6mo ago
can you please provide a complete minimal example ?
genetic-orange
genetic-orangeOP•6mo ago
genetic-orange
genetic-orangeOP•6mo ago
or https://github.com/jeroenpg/solidjs-loader-twice if you prefer to run locally
GitHub
GitHub - jeroenpg/solidjs-loader-twice
Contribute to jeroenpg/solidjs-loader-twice development by creating an account on GitHub.
genetic-orange
genetic-orange•6mo ago
so this is using SolidStart?
genetic-orange
genetic-orangeOP•6mo ago
"@tanstack/solid-start": "^1.114.29", ah yeah, the readme is misleading
genetic-orange
genetic-orange•6mo ago
k cc @Birk Skyum
genetic-orange
genetic-orangeOP•4mo ago
I noticed we didn't create an issue for this, should I create one, unless it's already on the radar? I was reminded of this issue because it bit me in the foot again! 😅

Did you find this page helpful?