Skip to content

Commit bd639c1

Browse files
authored
Update README.md
1 parent 4829eb4 commit bd639c1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

react/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,16 +377,16 @@
377377
SFC.defaultProps = {
378378
bar: '',
379379
children: null,
380-
};
381-
 ```
380+
};
381+
```
382+
383+
- 尽可能少地使用扩展运算符
382384

383-
+ 尽可能少地使用扩展运算符
384-
385385
  > 为什么? 除非你很想传递一些不必要的属性。对于React v15.6.1和更早的版本,你可以[给DOM传递一些无效的HTML属性](https://doc.react-china.org/blog/2017/09/08/dom-attributes-in-react-16.html)
386386

387387
例外情况:
388388

389-
 + 使用了变量提升的高阶组件
389+
 - 使用了变量提升的高阶组件
390390

391391
```jsx
392392
function HOC(WrappedComponent) {
@@ -403,7 +403,7 @@
403403
}
404404
```
405405

406-
 + 只有在清楚明白扩展对象时才使用扩展运算符。这非常有用尤其是在使用Mocha测试组件的时候。
406+
 - 只有在清楚明白扩展对象时才使用扩展运算符。这非常有用尤其是在使用Mocha测试组件的时候。
407407

408408
 ```jsx
409409
export default function Foo {

0 commit comments

Comments
 (0)