Skip to content

Commit 0ceb511

Browse files
CodinCatgaearon
authored andcommitted
Use single quotes, remove extra whitespace (facebook#9215)
1 parent 78761c3 commit 0ceb511

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/docs/optimizing-performance.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,17 +248,17 @@ If you're using Create React App, both `Object.assign` and the object spread syn
248248
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:
249249

250250
```javascript
251-
const x = { foo: "bar" };
251+
const x = { foo: 'bar' };
252252
const y = x;
253-
y.foo = "baz";
253+
y.foo = 'baz';
254254
x === y; // true
255255
```
256256

257257
Although `y` was edited, since it's a reference to the same object as `x`, this comparison returns `true`. You can write similar code with immutable.js:
258258

259259
```javascript
260260
const SomeRecord = Immutable.Record({ foo: null });
261-
const x = new SomeRecord({ foo: 'bar' });
261+
const x = new SomeRecord({ foo: 'bar' });
262262
const y = x.set('foo', 'baz');
263263
x === y; // false
264264
```

0 commit comments

Comments
 (0)