Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
javascript [2020/09/30 03:41] 127.0.0.1 external edit |
javascript [2020/10/05 03:09] (current) paul [Object Spread Operator] |
||
---|---|---|---|
Line 336: | Line 336: | ||
to explicitly pass a '' | to explicitly pass a '' | ||
+ | ===== Object Spread Operator ===== | ||
+ | |||
+ | The Object Spread Operator is '' | ||
+ | |||
+ | I was really confused about it when I saw it used to spread out properties of an object that was returned by a function [[https:// | ||
+ | |||
+ | <code javascript> | ||
+ | computed: { | ||
+ | localComputed () { /* ... */ }, | ||
+ | // mix this into the outer object with the object spread operator | ||
+ | ...mapState({ | ||
+ | // ... | ||
+ | }) | ||
+ | } | ||
+ | </ | ||