For now, this is the best way.
this.setState(previousState => ({
myArray: [...previousState.myArray, 'new value']
}));
More Related Contents:
- React setState not updating state
- Updating an object with setState in React
- React setState not Updating Immediately
- Does React keep the order for state updates?
- How does a “stack overflow” occur and how do you prevent it?
- Determining memory usage of objects?
- How can I update state.item[1] in state using setState?
- Cannot free memory once occupied by bytes.Buffer
- How to set Apache Spark Executor memory
- setInterval in a React app
- iOS6 MKMapView using a ton of memory, to the point of crashing the app, anyone else notice this?
- How to determine maximum stack usage?
- How much faster is the memory usually than the disk?
- When do I choose React state Vs Redux Store
- PHP Warning: POST Content-Length of 113 bytes exceeds the limit of -1988100096 bytes in Unknown
- Add element to a state React
- How to determine needed memory of Keras model?
- Go 1.3 Garbage collector not releasing server memory back to system
- What’s the relationship between “a” heap and “the” heap?
- TypeError: evt.target is null in functional setState
- How do cache lines work?
- getting error: Cannot read property state of undefined
- React – setState() on unmounted component
- How to check for broken images in React JS
- Update single value in item array | react redux
- How to change memory per node for apache spark worker
- Sort with the limited memory
- intrinsic memcmp
- Memory alignment on a 32-bit Intel processor
- GCC’s reordering of read/write instructions