You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following patterns are not considered warnings:
17
-
```js
17
+
```jsx
18
18
<div onClick={this._handleClick}></div>
19
19
```
20
20
@@ -59,7 +59,7 @@ When `true` the following is not considered a warning:
59
59
60
60
A common use case of `bind` in render is when rendering a list, to have a separate callback per list item:
61
61
62
-
```js
62
+
```jsx
63
63
var List =React.createClass({
64
64
render() {
65
65
return (
@@ -77,7 +77,7 @@ var List = React.createClass({
77
77
78
78
Rather than doing it this way, pull the repeated section into its own component:
79
79
80
-
```js
80
+
```jsx
81
81
var List =React.createClass({
82
82
render() {
83
83
return (
@@ -110,7 +110,7 @@ This will speed up rendering, as it avoids the need to create new functions (thr
110
110
111
111
Unfortunately [React ES6 classes](https://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html#es6-classes) do not autobind their methods like components created with the older `React.createClass` syntax. There are several approaches to binding methods for ES6 classes. A basic approach is to just manually bind the methods in the constructor:
0 commit comments