T
TanStack8mo ago
other-emerald

Link & startTransition

Hello everyone ! I am currently facing an issue with the usage of suspense in Tanstack Start. This is my setup : _app.tsx : the layout with the sidebar with the chat links _app.index.tsx : the route for the new chat page (like chatgpt) _app.chats.$chatId.tsx : the route for an existing chat My problem is that in _app.chats.$chatId.tsx I use the use hook to suspend on a (cached) promise I though that navigation was wrapped in startTransition given that the startTransition prop is deprecated on the Link component, but my app is flashing when clicking links to navigate to the chats page Any idea what's going on ? Thanks you all (Love Start)
3 Replies
metropolitan-bronze
metropolitan-bronze6mo ago
Were you able to get it to work? I have the same issue. Updating search params makes my app flash left and right. Trying to wrap the navigate calls in start transition did not work. Adding resetScroll=false still leads to scrolling ... I'm about to rip it out.
other-emerald
other-emeraldOP6mo ago
Nope, I think router uses useSyncExternalStore under the good which opts out of concurrent rendering
evident-indigo
evident-indigo6mo ago
let's all hope for react 19 to finally bring concurrent external stores soon (they are working on that ...)

Did you find this page helpful?