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?