Skip to content

Commit 3d4d7ba

Browse files
authored
Merge pull request #73 from reactjs/sync-e548bd7e
Sync with reactjs.org @ e548bd7
2 parents 4b89a75 + 1ca1d02 commit 3d4d7ba

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

content/blog/2013-10-16-react-v0.5.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ It's been awesome to see the things that people are building with React, and we
3434
* Added `React.version`.
3535
* Added `React.isValidClass` - Used to determine if a value is a valid component constructor.
3636
* Removed `React.autoBind` - This was deprecated in v0.4 and now properly removed.
37-
* Renamed `React.unmountAndReleaseReactRootNode` to `React.unmountComponentAtNode`.
37+
* Renamed `React.unmountAndReleaseReactRootNode` to `React.unmountComponentAtNode`.
3838
* Began laying down work for refined performance analysis.
3939
* Better support for server-side rendering - [react-page](https://github.com/facebook/react-page) has helped improve the stability for server-side rendering.
4040
* Made it possible to use React in environments enforcing a strict [Content Security Policy](https://developer.mozilla.org/en-US/docs/Security/CSP/Introducing_Content_Security_Policy). This also makes it possible to use React to build Chrome extensions.

content/docs/faq-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ React doesn't have opinions on how you put files into folders. That said there a
1212

1313
#### Grouping by features or routes {#grouping-by-features-or-routes}
1414

15-
One common way to structure projects is locate CSS, JS, and tests together inside folders grouped by feature or route.
15+
One common way to structure projects is to locate CSS, JS, and tests together inside folders grouped by feature or route.
1616

1717
```
1818
common/

content/docs/optimizing-performance.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,14 +371,16 @@ function updateColorMap(colormap) {
371371

372372
`updateColorMap` now returns a new object, rather than mutating the old one. `Object.assign` is in ES6 and requires a polyfill.
373373

374-
There is a JavaScript proposal to add [object spread properties](https://github.com/sebmarkbage/ecmascript-rest-spread) to make it easier to update objects without mutation as well:
374+
[Object spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax) makes it easier to update objects without mutation as well:
375375

376376
```js
377377
function updateColorMap(colormap) {
378378
return {...colormap, right: 'blue'};
379379
}
380380
```
381381

382+
This feature was added to JavaScript in ES2018.
383+
382384
If you're using Create React App, both `Object.assign` and the object spread syntax are available by default.
383385

384386
When you deal with deeply nested objects, updating them in an immutable way can feel convoluted. If you run into this problem, check out [Immer](https://github.com/mweststrate/immer) or [immutability-helper](https://github.com/kolodny/immutability-helper). These libraries let you write highly readable code without losing the benefits of immutability.

0 commit comments

Comments
 (0)