@taujs/react 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -93,7 +93,7 @@ declare function createRenderer<T extends Record<string, unknown> = Record<strin
|
|
|
93
93
|
*
|
|
94
94
|
* Provides framework-agnostic primitives for accessing route data:
|
|
95
95
|
* - SSR hydration (window.__INITIAL_DATA__)
|
|
96
|
-
* - Client-side fetch (/__taujs/
|
|
96
|
+
* - Client-side fetch (/__taujs/route endpoint)
|
|
97
97
|
*
|
|
98
98
|
* This is a transport layer only. For data orchestration (caching, refetch, etc.),
|
|
99
99
|
* use TanStack Query or similar.
|
|
@@ -125,7 +125,7 @@ declare function readInitialDataOnce<T extends RouteData = RouteData>(): T | nul
|
|
|
125
125
|
/**
|
|
126
126
|
* Fetch route data from the τjs data endpoint.
|
|
127
127
|
*
|
|
128
|
-
* Calls: GET /__taujs/
|
|
128
|
+
* Calls: GET /__taujs/route?url=<pathname>
|
|
129
129
|
* Returns: { data: T }
|
|
130
130
|
*
|
|
131
131
|
* Throws RouteDataError on non-2xx responses with structured error info.
|
package/dist/index.js
CHANGED
|
@@ -578,7 +578,7 @@ async function fetchRouteData(pathname, init) {
|
|
|
578
578
|
if (!pathname) {
|
|
579
579
|
throw new Error("fetchRouteData: pathname is required");
|
|
580
580
|
}
|
|
581
|
-
const url = `/__taujs/
|
|
581
|
+
const url = `/__taujs/route?url=${encodeURIComponent(pathname)}`;
|
|
582
582
|
const res = await fetch(url, {
|
|
583
583
|
credentials: "include",
|
|
584
584
|
...init
|