From 0056359310c25286a582d7af0327b2082f534b85 Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Mon, 10 Apr 2017 15:19:35 +0900 Subject: [PATCH] Bind this to handlers in constructor --- docs/api/ReactWrapper/matchesElement.md | 4 ++++ docs/api/ShallowWrapper/matchesElement.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/api/ReactWrapper/matchesElement.md b/docs/api/ReactWrapper/matchesElement.md index e67a9bbb7..6a7a87db9 100644 --- a/docs/api/ReactWrapper/matchesElement.md +++ b/docs/api/ReactWrapper/matchesElement.md @@ -22,6 +22,10 @@ render tree. ```jsx class MyComponent extends React.Component { + constructor(props) { + super(props); + this.handleClick = this.handleClick.bind(this); + } handleClick() { ... } diff --git a/docs/api/ShallowWrapper/matchesElement.md b/docs/api/ShallowWrapper/matchesElement.md index fd8fe2238..95deea070 100644 --- a/docs/api/ShallowWrapper/matchesElement.md +++ b/docs/api/ShallowWrapper/matchesElement.md @@ -22,6 +22,10 @@ render tree. ```jsx class MyComponent extends React.Component { + constructor(props) { + super(props); + this.handleClick = this.handleClick.bind(this); + } handleClick() { ... }