We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4829eb4 commit bd639c1Copy full SHA for bd639c1
react/README.md
@@ -377,16 +377,16 @@
377
SFC.defaultProps = {
378
bar: '',
379
children: null,
380
- };
381
- ```
+ };
+ ```
382
+
383
+ - 尽可能少地使用扩展运算符
384
- + 尽可能少地使用扩展运算符
-
385
> 为什么? 除非你很想传递一些不必要的属性。对于React v15.6.1和更早的版本,你可以[给DOM传递一些无效的HTML属性](https://doc.react-china.org/blog/2017/09/08/dom-attributes-in-react-16.html)
386
387
例外情况:
388
389
- + 使用了变量提升的高阶组件
+ - 使用了变量提升的高阶组件
390
391
```jsx
392
function HOC(WrappedComponent) {
@@ -403,7 +403,7 @@
403
}
404
```
405
406
- + 只有在清楚明白扩展对象时才使用扩展运算符。这非常有用尤其是在使用Mocha测试组件的时候。
+ - 只有在清楚明白扩展对象时才使用扩展运算符。这非常有用尤其是在使用Mocha测试组件的时候。
407
408
409
export default function Foo {
0 commit comments