houdini-react 0.0.0-20240402063001 → 0.0.0-20240402063326

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.
@@ -92,10 +92,12 @@ function Router({
92
92
  window.removeEventListener("popstate", onChange);
93
93
  };
94
94
  }, []);
95
+ const goto = (url) => {
96
+ data_cache.clear();
97
+ setCurrentURL(url);
98
+ };
95
99
  useLinkBehavior({
96
- goto: (val) => {
97
- setCurrentURL(val);
98
- },
100
+ goto,
99
101
  preload(url, which) {
100
102
  const [page2, variables2] = (0, import_match.find_match)(import_config.default, manifest, url);
101
103
  if (!page2) {
@@ -114,10 +116,7 @@ function Router({
114
116
  {
115
117
  value: {
116
118
  pathname: currentURL,
117
- goto: (url) => {
118
- data_cache.clear();
119
- setCurrentURL(url);
120
- },
119
+ goto,
121
120
  params: variables ?? {}
122
121
  },
123
122
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageComponent, { url: currentURL }, page.id)
@@ -51,10 +51,12 @@ function Router({
51
51
  window.removeEventListener("popstate", onChange);
52
52
  };
53
53
  }, []);
54
+ const goto = (url) => {
55
+ data_cache.clear();
56
+ setCurrentURL(url);
57
+ };
54
58
  useLinkBehavior({
55
- goto: (val) => {
56
- setCurrentURL(val);
57
- },
59
+ goto,
58
60
  preload(url, which) {
59
61
  const [page2, variables2] = find_match(configFile, manifest, url);
60
62
  if (!page2) {
@@ -73,10 +75,7 @@ function Router({
73
75
  {
74
76
  value: {
75
77
  pathname: currentURL,
76
- goto: (url) => {
77
- data_cache.clear();
78
- setCurrentURL(url);
79
- },
78
+ goto,
80
79
  params: variables ?? {}
81
80
  },
82
81
  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-20240402063001",
3
+ "version": "0.0.0-20240402063326",
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-20240402063001"
46
+ "houdini": "^0.0.0-20240402063326"
47
47
  },
48
48
  "files": [
49
49
  "build"