Replacing locationState props with useLocation? #8956
Unanswered
billsaysthis
asked this question in
v5 to v6 Migration
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Our existing component has this props interface:
type AllProps = { location: { search: string; pathname: string; state?: { tab: string; status: SMSListingStatusToast } } }But if I change the route from
atoband inside the component switch from deconstructingpropsto deconstructinguseLocationI get TS errors likeProperty 'tab' does not exist on type 'LocationState'Note: I get the same error even if I use
AllPropsto typeuseLocation.Beta Was this translation helpful? Give feedback.
All reactions