T
TanStack6mo ago
metropolitan-bronze

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
conscious-sapphire
conscious-sapphire3mo 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.
metropolitan-bronze
metropolitan-bronzeOP3mo ago
Nope, I think router uses useSyncExternalStore under the good which opts out of concurrent rendering
adverse-sapphire
adverse-sapphire3mo 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?