From 17b2ede22b8a9c6886efe6bdaa30fdb375493eba Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Fri, 27 Nov 2015 21:22:08 -0800 Subject: [PATCH] fix method binding --- app/js/App.js | 3 +++ app/js/pages/SearchPage.js | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/js/App.js b/app/js/App.js index 4d4e2df..df6df5f 100644 --- a/app/js/App.js +++ b/app/js/App.js @@ -20,6 +20,9 @@ class App extends React.Component { constructor(props) { super(props); + + this.onUserChange = this.onUserChange.bind(this); + this.state = { currentUser: {} }; diff --git a/app/js/pages/SearchPage.js b/app/js/pages/SearchPage.js index da9d70d..8cac077 100644 --- a/app/js/pages/SearchPage.js +++ b/app/js/pages/SearchPage.js @@ -12,6 +12,9 @@ class SearchPage extends React.Component { constructor(props) { super(props); + + this.handleQueryChange = this.handleQueryChange.bind(this); + this.state = { query: '' }; @@ -33,7 +36,7 @@ class SearchPage extends React.Component {

Your query: {this.state.query}

- +