Skip to content

[v6] Add generic to useLocation #7345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

SevenOutman
Copy link
Contributor

It seems that history.Location itself need to be improved too.

// No
type State = object | null;

interface Location<S extends State = State> {
  state: S;
}

// Yes
interface Location<S extends object = object> {
  state: S | null;
}

@SevenOutman SevenOutman changed the title improve(dts): Add generic to useLocation [v6] Add generic to useLocation May 14, 2020
@timdorr
Copy link
Member

timdorr commented May 14, 2020

#7326 (comment)

@timdorr timdorr closed this May 14, 2020
brophdawg11 added a commit that referenced this pull request Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants