Skip to content

Commit af55d14

Browse files
authored
[preact-iso] Fix Router un-rendering incoming same-component route
I'm not 100% sure if this is the right solution, but reverting this line fixes the issue: https://github.com/preactjs/wmr/pull/835/files#diff-b8c8c162d167c1ad31cb8461c49197c9c5527c58c2cde64d5c082d7359878ffdL123 My thinking is that `url` here is the full `location.path + location.search`, so the worst case is that we're potentially re-rendering routers that are unaffected by a given URL change.
1 parent deab6d4 commit af55d14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export function Router(props) {
125125
});
126126

127127
return h(RouteContext.Provider, { value: m }, p || d);
128-
}, [rest, params]);
128+
}, [url]);
129129

130130
// Reset previous children - if rendering succeeds synchronously, we shouldn't render the previous children.
131131
const p = prev.current;

0 commit comments

Comments
 (0)