Commit ad3ab7f
authored
refactor(router-core): unify replaceEqualDeep implementation w/ query (#5067)
Following TanStack/query#9604, this PR
replicates the implementation of `replaceEqualDeep` here, so that both
are more similar (avoid drifting apart over time).
There are no performance changes.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- Performance
- Optimized internal deep-compare and replacement logic to short-circuit
equal values and avoid unnecessary recursion, improving route state
updates. Users may see faster navigations and reduced CPU usage in
complex scenarios.
- Refactor
- Simplified internal implementation while preserving existing behavior
and public APIs. No functional changes or breaking changes for
consumers.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 5b5f792 commit ad3ab7f
1 file changed
+19
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
221 | 220 | | |
222 | | - | |
| 221 | + | |
223 | 222 | | |
224 | 223 | | |
225 | 224 | | |
| |||
234 | 233 | | |
235 | 234 | | |
236 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
237 | 244 | | |
238 | | - | |
239 | | - | |
240 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
241 | 249 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 250 | + | |
| 251 | + | |
250 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
251 | 257 | | |
252 | 258 | | |
253 | 259 | | |
| |||
0 commit comments