T
TanStack•8mo ago
xenial-black

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
xenial-black
xenial-blackOP•8mo ago
to clarify, this is on the initial load and not preloaded
grumpy-cyan
grumpy-cyan•8mo ago
can you please provide a complete minimal example ?
xenial-black
xenial-blackOP•8mo ago
xenial-black
xenial-blackOP•8mo 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.
grumpy-cyan
grumpy-cyan•8mo ago
so this is using SolidStart?
xenial-black
xenial-blackOP•8mo ago
"@tanstack/solid-start": "^1.114.29", ah yeah, the readme is misleading
grumpy-cyan
grumpy-cyan•8mo ago
k cc @Birk Skyum
xenial-black
xenial-blackOP•7mo 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?