houdini-react 0.0.0-20240402060051 → 0.0.0-20240402063001
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.
|
@@ -73,7 +73,7 @@ function Router({
|
|
|
73
73
|
assetPrefix,
|
|
74
74
|
injectToStream
|
|
75
75
|
});
|
|
76
|
-
const { component_cache } = useRouterContext();
|
|
76
|
+
const { component_cache, data_cache } = useRouterContext();
|
|
77
77
|
const PageComponent = component_cache.get(page.id);
|
|
78
78
|
import_react.default.useEffect(() => {
|
|
79
79
|
if (globalThis.window && window.location.pathname !== currentURL) {
|
|
@@ -114,7 +114,10 @@ function Router({
|
|
|
114
114
|
{
|
|
115
115
|
value: {
|
|
116
116
|
pathname: currentURL,
|
|
117
|
-
goto:
|
|
117
|
+
goto: (url) => {
|
|
118
|
+
data_cache.clear();
|
|
119
|
+
setCurrentURL(url);
|
|
120
|
+
},
|
|
118
121
|
params: variables ?? {}
|
|
119
122
|
},
|
|
120
123
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageComponent, { url: currentURL }, page.id)
|
|
@@ -32,7 +32,7 @@ function Router({
|
|
|
32
32
|
assetPrefix,
|
|
33
33
|
injectToStream
|
|
34
34
|
});
|
|
35
|
-
const { component_cache } = useRouterContext();
|
|
35
|
+
const { component_cache, data_cache } = useRouterContext();
|
|
36
36
|
const PageComponent = component_cache.get(page.id);
|
|
37
37
|
React.useEffect(() => {
|
|
38
38
|
if (globalThis.window && window.location.pathname !== currentURL) {
|
|
@@ -73,7 +73,10 @@ function Router({
|
|
|
73
73
|
{
|
|
74
74
|
value: {
|
|
75
75
|
pathname: currentURL,
|
|
76
|
-
goto:
|
|
76
|
+
goto: (url) => {
|
|
77
|
+
data_cache.clear();
|
|
78
|
+
setCurrentURL(url);
|
|
79
|
+
},
|
|
77
80
|
params: variables ?? {}
|
|
78
81
|
},
|
|
79
82
|
children: /* @__PURE__ */ jsx(PageComponent, { url: currentURL }, page.id)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-react",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20240402063001",
|
|
4
4
|
"description": "The React plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"recast": "^0.23.1",
|
|
44
44
|
"rollup": "^3.7.4",
|
|
45
45
|
"use-deep-compare-effect": "^1.8.1",
|
|
46
|
-
"houdini": "^0.0.0-
|
|
46
|
+
"houdini": "^0.0.0-20240402063001"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
49
|
"build"
|