8000 Comparing v5.0.1...v5.0.2 · remix-run/history · GitHub
[go: up one dir, main page]

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: remix-run/history
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.0.1
Choose a base ref
...
head repository: remix-run/history
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.0.2
Choose a head ref
  • 6 commits
  • 4 files changed
  • 2 contributors

Commits on Nov 1, 2021

  1. Configuration menu
    Copy the full SHA
    3095a04 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #902 from remix-run/jacob/rem-473-redirects-after-…

    …action-are-persisting
    
    fix: search params persisting on redirects
    ryanflorence authored Nov 1, 2021
    Configuration menu
    Copy the full SHA
    2d5c85e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8cb33f2 View commit details
    Browse the repository at this point in the history
  4. fix: remove generic State from Location type

    `location.state` is like `location.search`, there's no way for a type system to do its job with a value that isn't controlled by the code. Similarly, the DOM type for `URLSearchParams` is not generic. And the built-in types for `window.history.state` is `any` without a generic. The only way to type check `location.state` or `location.search` or really any value on `location.*` is to do it at runtime and then get type hints from using type guards.
    
    ```ts
    interface ModalLocation extends Location {
      state: "modal"
    }
     
    
    function isModalLocation(location) location is ModalLocation {
      return location.state === "modal"
    }
    
    if (isModalLocation(location)) {
      // runtime by necessity but now also type safe in here
    }
    ```
    ryanflorence committed Nov 1, 2021
    Configuration menu
    Copy the full SHA
    04a01ad View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    82e5352 View commit details
    Browse the repository at this point in the history
  6. Version 5.0.2

    ryanflorence committed Nov 1, 2021
    Configuration menu
    Copy the full SHA
    ed674b5 View commit details
    Browse the repository at this point in the history
Loading
0