@samitouri / QOS-React-2 / commits / 1c831b186c

Fix typos

Just s/Javascript/Javascript/g and punctuation changes.

Joshua Go committed Jul 5, 2015 at 00:15 UTC 1c831b186cfa9c02e65a34845340ffa45a30bfe0
1 file changed +4 -4
docs/docs/11-advanced-performance.md
+4 -4
@@ -59,7 +59,7 @@ React.createClass({
59 });
60 ```
61
62 -We could easily implement `shouldComponentUpdate` as follow:
62 +We could easily implement `shouldComponentUpdate` as follows:
63
64 ```javascript
65 shouldComponentUpdate: function(nextProps, nextState) {
@@ -69,7 +69,7 @@ shouldComponentUpdate: function(nextProps, nextState) {
69
70 So far so good, dealing with such simple props/state structures is easy. We could even generalize an implementation based on shallow equality and mix it into components. In fact, React already provides such implementation: [PureRenderMixin](/react/docs/pure-render-mixin.html).
71
72 -But what if your components' props or state are mutable data structures?. Say the prop the component receives, instead of being a string like `'bar'`, is a Javascript object that contains a string such as, `{ foo: 'bar' }`:
72 +But what if your components' props or state are mutable data structures? Say the prop the component receives, instead of being a string like `'bar'`, is a JavaScript object that contains a string such as, `{ foo: 'bar' }`:
73
74 ```javascript
75 React.createClass({
@@ -133,13 +133,13 @@ Consequently, since we'll miss the change on the prop and short circuit the re-r
133
134 ## Immutable-js to the rescue
135
136 -[Immutable-js](https://github.com/facebook/immutable-js) is a Javascript collections library written by Lee Byron, which Facebook recently open-sourced. It provides *immutable persistent* collections via *structural sharing*. Lets see what these properties mean:
136 +[Immutable-js](https://github.com/facebook/immutable-js) is a JavaScript collections library written by Lee Byron, which Facebook recently open-sourced. It provides *immutable persistent* collections via *structural sharing*. Let's see what these properties mean:
137
138 * *Immutable*: once created, a collection cannot be altered at another point in time.
139 * *Persistent*: new collections can be created from a previous collection and a mutation such as set. The original collection is still valid after the new collection is created.
140 * *Structural Sharing*: new collections are created using as much of the same structure as the original collection as possible, reducing copying to a minimum to achieve space efficiency and acceptable performance. If the new collection is equal to the original, the original is often returned.
141
142 -Immutability makes tracking changes cheap; a change will always result in a new object so we only need to check if the reference to the object has changed. For example, in this regular Javascript code:
142 +Immutability makes tracking changes cheap; a change will always result in a new object so we only need to check if the reference to the object has changed. For example, in this regular JavaScript code:
143
144 ```javascript
145 var x = { foo: "bar" };