Commit f6e06ad
authored
fix(history): pushing/replacing a route sometimes resulted in a back/next action (#56)
Previously, actions dispatched by the user to push/replace the route were intercepted and turned into back/next actions if they matched the next or previous entry in the history stack. This meant that it was not possible to push/replace the next/previous route in the history stack. This change removes that behaviour, so that the direction of dispatched actions are preserved.
BREAKING CHANGE: dispatching a route that matches the previous/next route in the history stack is no longer reinterpreted as a back/next action
BREAKING CHANGE: history functions `set`/`setParams`/`setState`/`setQuery`/`setHash`/`setBasename` no longer accept a function as an argument
BREAKING CHANGE: history functions `set`/`setParams`/`setState`/`setQuery` no longer merge their arguments with the existing params/state/query
BREAKING CHANGE: history functions `back`/`next`/`jump` no longer accept a state argument
Fixes #481 parent 0daa0b4 commit f6e06ad
23 files changed
Lines changed: 2512 additions & 6871 deletions
File tree
- packages
- integration-tests
- __helpers__
- __tests__/integration
- __snapshots__
- actions
- __snapshots__
- browser
- actionsInCallbacks
- __snapshots__
- history
- __snapshots__
- sessionStorage
- __snapshots__
- rudy/src
- actions
- history
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
198 | 203 | | |
199 | 204 | | |
200 | 205 | | |
| |||
Lines changed: 40 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
229 | 244 | | |
230 | 245 | | |
231 | | - | |
| 246 | + | |
232 | 247 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
236 | 251 | | |
237 | 252 | | |
238 | 253 | | |
| |||
276 | 291 | | |
277 | 292 | | |
278 | 293 | | |
279 | | - | |
| 294 | + | |
280 | 295 | | |
281 | 296 | | |
282 | 297 | | |
| |||
308 | 323 | | |
309 | 324 | | |
310 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
311 | 341 | | |
312 | 342 | | |
313 | 343 | | |
314 | | - | |
| 344 | + | |
315 | 345 | | |
316 | | - | |
317 | | - | |
318 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
319 | 349 | | |
320 | 350 | | |
321 | 351 | | |
| |||
0 commit comments