-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
startEverything about TanStack StartEverything about TanStack Start
Description
Which project does this relate to?
Start
Describe the bug
Unlike normal render which comes with router.load(), hydrate from @tanstack/start-client-core won't emit events like 'onLoad', 'onResolved' from router subscriptions when initially rendered.
In my scenario, I need to trigger an action once the router is loaded but the StartClient and hydrate won't allow it.
Your Example Website or App
https://github.com/hiendv/tanstack-start-hydrate-events
Steps to Reproduce the Bug or Issue
- Go to the reproduction repo
- Clone and
pnpm install pnpm test- This test fails: https://github.com/hiendv/tanstack-start-hydrate-events/blob/master/src/client.test.tsx
- This is the test for the workaround: https://github.com/hiendv/tanstack-start-hydrate-events/blob/master/src/client-promised.test.tsx
Expected behavior
As a user, I expect to be able to subscribe to events like normal router.load()
Screenshots or Videos
No response
Platform
- OS: Ubuntu 24.04.2 LTS
- Browser: Version 134.0.6998.88 (Official Build) (64-bit) / JSDOM / Happy DOM
- Version:
- @tanstack/start-client-core@1.114.25
- @tanstack/react-router@1.114.25
- react-dom@19.0.0
- react@19.0.0
Additional context
No response
Metadata
Metadata
Assignees
Labels
startEverything about TanStack StartEverything about TanStack Start