Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react native update state array of objects

let newMarkers = markers.map(el => (
      el.name==='name'? {...el, key: value}: el
))
this.setState({ markers });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #native #update #state #array #objects
ADD COMMENT
Topic
Name
2+2 =