setProps()function
setProps(obj: T, entries: T | Partial<T> | Iterable<Prop<T>>): void
| Param | Type | |
|---|---|---|
obj | T | The object to set the props on (modified by reference). required |
entries | TPartial<T>Iterable<Prop<T>> | The props to set, as an object or iterable set of key/value entry tuples. required |
Set several named props on an object (by reference).
Examples
setProps(obj, { a: 1, b: 2 });