Skip to content

Commit

Permalink
Bind this to handlers in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
koba04 committed Apr 10, 2017
1 parent 851a6a8 commit 0056359
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/api/ReactWrapper/matchesElement.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ render tree.

```jsx
class MyComponent extends React.Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
handleClick() {
...
}
Expand Down
4 changes: 4 additions & 0 deletions docs/api/ShallowWrapper/matchesElement.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ render tree.

```jsx
class MyComponent extends React.Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
handleClick() {
...
}
Expand Down

0 comments on commit 0056359

Please sign in to comment.