From d26489eb963fc791a5d89cfe33ede196a5cad4b3 Mon Sep 17 00:00:00 2001 From: Stefan Rimola Date: Mon, 16 Apr 2018 22:21:10 -0700 Subject: [PATCH] Remove unnecessary newlines --- docs/recipes/UsingObjectSpreadOperator.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/recipes/UsingObjectSpreadOperator.md b/docs/recipes/UsingObjectSpreadOperator.md index 5b48158e1f..04136cf7cb 100644 --- a/docs/recipes/UsingObjectSpreadOperator.md +++ b/docs/recipes/UsingObjectSpreadOperator.md @@ -1,8 +1,6 @@ # Using Object Spread Operator -Since one of the core tenets of Redux is to never mutate state, you'll often find yourself using [`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) to create -copies of objects with new or updated values. For example, in the `todoApp` below `Object.assign()` is used to return a new -`state` object with an updated `visibilityFilter` property: +Since one of the core tenets of Redux is to never mutate state, you'll often find yourself using [`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) to create copies of objects with new or updated values. For example, in the `todoApp` below `Object.assign()` is used to return a new `state` object with an updated `visibilityFilter` property: ```js function todoApp(state = initialState, action) { @@ -19,8 +17,7 @@ function todoApp(state = initialState, action) { While effective, using `Object.assign()` can quickly make simple reducers difficult to read given its rather verbose syntax. -An alternative approach is to use the [object spread syntax](https://github.com/sebmarkbage/ecmascript-rest-spread) proposed for the next versions of JavaScript which lets you use the spread (`...`) operator to copy enumerable properties from one object to another in a more succinct way. The object spread operator is conceptually similar to the ES6 [array spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). We -can simplify the `todoApp` example above by using the object spread syntax: +An alternative approach is to use the [object spread syntax](https://github.com/sebmarkbage/ecmascript-rest-spread) proposed for the next versions of JavaScript which lets you use the spread (`...`) operator to copy enumerable properties from one object to another in a more succinct way. The object spread operator is conceptually similar to the ES6 [array spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). We can simplify the `todoApp` example above by using the object spread syntax: ```js function todoApp(state = initialState, action) {