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

Must use destructuring props assignment issue

$
0
0

I was making an app in react-native and when I try to put on text one of the values of props, I get an error message like this: Must use destructuring props assignment

The code is this:

<Text style={styles.SubTextButton}>
      {props.date1} - {props.date2}
</Text>

and the props look like this:

(props: {
  text: string
  date1: string
  date2: string
})

The thing is, this actually don't ruin my app and all work well. But I would like to know if it is maybe a question of format in the writing of the code or even an error of the ESlinter.


Viewing all articles
Browse latest Browse all 6208

Trending Articles



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