diff --git a/packages/loaders/src/index.ts b/packages/loaders/src/index.ts index fc68ffc9f5..229dc9d8f1 100644 --- a/packages/loaders/src/index.ts +++ b/packages/loaders/src/index.ts @@ -81,6 +81,7 @@ export class LoaderClient< { onUpdate: (next) => { this.state = next + return next }, }, ) as LoaderClientStore @@ -454,12 +455,11 @@ export class LoaderInstance< } } }, - onUpdate: (next, prev) => { + onUpdate: (next) => { this.state = next - // if (next.isLoading !== prev.isLoading) { this.#notifyClient() - // } + return next }, }, ) diff --git a/packages/router/src/routeMatch.ts b/packages/router/src/routeMatch.ts index a9dad15a4b..eefad9befa 100644 --- a/packages/router/src/routeMatch.ts +++ b/packages/router/src/routeMatch.ts @@ -97,6 +97,7 @@ export class RouteMatch< { onUpdate: (next) => { this.state = next + return next }, }, ), diff --git a/packages/router/src/router.ts b/packages/router/src/router.ts index ddd9fcd4a4..ab4596345b 100644 --- a/packages/router/src/router.ts +++ b/packages/router/src/router.ts @@ -296,6 +296,7 @@ export class Router< { onUpdate: (state) => { this.state = state + return state }, }, )