ractive.set()
edit this pageUpdates data and triggers a re-render of any mustaches that are affected (directly or indirectly) by the change. Any observers of affected keypaths will be notified.
A set event will be fired with keypath and value as arguments (or map, if you set multiple options at once).
ractive.set( keypath, value[, complete ])
Returns
ractivekeypath
StringThe keypath of the data we're changing, e.g.
useroruser.nameoruser.friends[1]value
The value we're changing it to. Can be a primitive or an object (or array), in which case dependants of downstream keypaths will also be re-rendered (if they have changed)
complete
FunctionA function that will be called, with
ractiveasthis, as soon as all transitions triggered by the change (i.e. elements being added or removed) are completeractive.set( map[, complete ])
Returns
ractivemap
ObjectA map of
keypath: valuepairs, as abovecomplete
FunctionAs above