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
Imagine, I have a controlled select input that's synced with corpId param from the URL like
functionLayout(){constparams=router.getUrlParams()// an imaginary function that gets all URL paramsconst{ navigate }=router.useMatch("/")return(<><header><selectvalue={params.corpId}onChange={event=>navigate({to: `/${event.target.value}`})}><optionid="00000">Corp Name #1</option><optionid="11111">Corp Name #2</option></select></header><main><Outlet/></main></>)}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I might be thinking about it in a wrong way, but I can't seem to figure how would I get URL params in a parent route / layout.
Imagine, I have a controlled select input that's synced with
corpId
param from the URL likeBeta Was this translation helpful? Give feedback.
All reactions