-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
v3: history state hook #349
Conversation
size-limit report 📦
|
to: string | URL, | ||
options?: { replace?: boolean } | ||
) => void; | ||
export const useHistoryState: <T = any>() => T; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can rename this file to use-browser-location
, as well as move everything that goes before export type Primitive
to index.d.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the file.
but moving is not great because it is harder to maintain preact
types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add a one-liner spec to test that Link
can accept state
prop?
Api for
useHistoryState
, should solve all problems withhistory.state
usage example:
TODOs:
closes #102
related #346