Skip to content

Instantly share code, notes, and snippets.


joecritch/gist:476806f0174ed74791ec Secret

Last active Aug 29, 2015
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

This comment has been minimized.

Copy link
Owner Author

@joecritch joecritch commented Jun 30, 2014

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
You can’t perform that action at this time.