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

Cannot assign to read only property 'selected' of object '#' react native

$
0
0

I am in the process of updating my react native project to the latest version. I am also using typescript. I am copying a lot of old code into and one code bit is this

 let groupSelected = this.props.screenProps.contactGroups[this.state.groupIndexSelected] this.setState({    expandedContacts: [...this.state.expandedContacts, groupSelected],  })groupSelected.GroupDropdownMenuChoices.forEach(choice => {    choice.selected = false    choice.selectedNotAll = false})

I am getting this error

Cannot assign to read only property 'selected' of object '#'

Can I get some help here?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



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