Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:03
What would you like to do?
using React.addons.update + splice to replace array elements by key
var points = React.addons.update(this.state.points, {
$splice: [
latLng: latLng,
place: true,
title: title
Copy link

This would create a new array, with a replaced object, positioned at whatever this.state.myIndex is equal to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment