showing results for - "react native update state object inside object"
Nikolai
22 Oct 2019
1this.setState(prevState => ({
2   ...prevState,
3    jasper: {                   // object that we want to update
4        ...prevState.jasper,    // keep all other key-value pairs
5        name: 'something'       // update the value of specific key
6    }
7}))
8
9