I am trying to extract the params as follows using useRoute
as follows.
const route = useRoute(); const { params } = route; const { id, name, } = params;
Everything works fine but the linter is highlighting id
and name
with the following error.
Property 'id' does not exist on type 'object | undefined
How do I overcome this issue.