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
Copy file name to clipboardexpand all lines: docs/rules/jsx-no-bind.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ When `true` the following is not considered a warning:
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
62
```jsx
63
-
var List =React.createClass({
63
+
var List =createReactClass({
64
64
render() {
65
65
return (
66
66
<ul>
@@ -78,7 +78,7 @@ var List = React.createClass({
78
78
Rather than doing it this way, pull the repeated section into its own component:
79
79
80
80
```jsx
81
-
var List =React.createClass({
81
+
var List =createReactClass({
82
82
render() {
83
83
return (
84
84
<ul>
@@ -90,7 +90,7 @@ var List = React.createClass({
90
90
}
91
91
});
92
92
93
-
var ListItem =React.createClass({
93
+
var ListItem =createReactClass({
94
94
render() {
95
95
return (
96
96
<li onClick={this._onClick}>
@@ -108,7 +108,7 @@ This will speed up rendering, as it avoids the need to create new functions (thr
108
108
109
109
### ES6 Classes
110
110
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:
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 `createReactClass` 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