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
The param inside here returns null but the param used in the actual render component just before the step that uses this component returns correct value. I tried various permutations here, but found it weird.
My path is: /x/y/1
Inside the component added to the step:
useLocation returns: /x/y/1
useParam returns {} but it should return {z: 1}
Inside the component that is rendered in the above route:
useParam: returns {z: 1}
The text was updated successfully, but these errors were encountered:
Mind creating a minimal reproduction in a sandbox in order to allow others to debug faster your use-case and try to find a solution as soon as possible? Thanks!
Hi,
For content, I have a custom component.
`
const Component = () => {
const { paramName } = useParams();
if(paramName) => return somehing
return ( return something else)
}
`
The param inside here returns null but the param used in the actual render component just before the step that uses this component returns correct value. I tried various permutations here, but found it weird.
My path is: /x/y/1
Inside the component added to the step:
useLocation returns: /x/y/1
useParam returns {} but it should return {z: 1}
Inside the component that is rendered in the above route:
useParam: returns {z: 1}
The text was updated successfully, but these errors were encountered: