Skip to content

Commit

Permalink
修改两处笔误 (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
dblate authored and otakustay committed Jan 13, 2020
1 parent ddb0eff commit 18a2da2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions react-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
使用类属性语法虽然可以避免引入一个`autobind`的实现,但存在一定的缺陷:

1. 对于新手不容易理解函数内的`this`的定义。
2. 无法在函数是使用其它的装饰器(如`memoize``deprecated`或检验相关的逻辑等)。
2. 无法在函数上使用其它的装饰器(如`memoize``deprecated`或检验相关的逻辑等)。

因此,推荐使用`@autobind`装饰器实现`this`的事先绑定,推荐使用[core-decorators](https://www.npmjs.com/package/core-decorators)库提供的相关装饰器实现。

Expand Down Expand Up @@ -292,7 +292,7 @@
return (
<div>
<span>Hello World</span>
</div>;
</div>
);
}
}
Expand Down

0 comments on commit 18a2da2

Please sign in to comment.