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 )
Returns a
Promise(see Promises)keypath
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)
ractive.set( map )
Returns
ractivemap
ObjectA map of
keypath: valuepairs, as above