Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6211

Using typescript with useRoute on react navigation v5

$
0
0

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 namewith the following error.

Property 'id' does not exist on type 'object | undefined

How do I overcome this issue.


Viewing all articles
Browse latest Browse all 6211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>