You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would actually remove type safety, as you would be overriding state to that type. You should be using type narrowing to determine the type of state safely. A generic would be a hack to force that to work.
What is the new or updated feature that you are suggesting?
type State = { from : string; base: string}
const location = useLocation()
// types
export declare function useLocation<T = unknown>(): Location;
export interface Location extends Path {
state: T;
key: Key;
}
Why should this feature be included?
Better type inference experience
The text was updated successfully, but these errors were encountered: