var React = require('react');
var Authenticated = require('../../utils/authenticated');
var Router = require('react-router');
var Firebase = require('firebase');
var forge = "https://dibbl.firebaseio.com/"; //YOUR FIREBASE URL HERE
var ref = new Firebase(forge);
var searchResults = [];


var Discovery = React.createClass({
  mixins: [Authenticated],
  getInitialState: function(){
    return {searchResults: []};
  },
  handleSearch: function(e){
    e.preventDefault();
    var query = "computer";
    ref.child('users').on("child_added", function(snapshot){
      var user = snapshot.val();
      var skills = user.skills;
      if (skills.indexOf(query) >= 0) {
        searchResults.push(user);
        console.log('1', searchResults);
        this.setState({
          searchResults: searchResults,
        });
      };
    }.bind(this));
  },
  render: function(){
    console.log('2', this.state.searchResults);
    var userBlock = function(index) {
      return (
        <div>
          <h4>{index.firstname} {index.lastname}</h4>
        </div>
      )
    };
    return (
      <div>
        <form id="searchForm" onSubmit={this.handleSearch}>
          <input type="text"></input>
          <input type="submit"></input>
        </form>
        {this.state.searchResults.map(userBlock)}
      </div>
   );
  }
});

module.exports = Discovery;

@@ -260,33 +260,8 @@
 e);%0A
-var searchResults = %5B%5D;%0A%0A
 %0Avar
@@ -384,30 +384,116 @@
 : %5B%5D
-%7D;%0A  %7D,%0A  handleSearch
+, query: ''%7D;%0A  %7D,%0A  onChange: function(e) %7B%0A    this.setState(%7Bquery: e.target.value%7D);%0A  %7D,%0A  handleSubmit
 : fu
@@ -539,26 +539,26 @@
 var 
-query = %22computer%22
+searchResults = %5B%5D
 ;%0A  
@@ -706,16 +706,27 @@
 indexOf(
+this.state.
 query) %3E
@@ -770,49 +770,8 @@
 r);%0A
-        console.log('1', searchResults);%0A
     
@@ -830,16 +830,36 @@
 esults,%0A
+          query: ''%0A
         
@@ -921,56 +921,8 @@
 ()%7B%0A
-    console.log('2', this.state.searchResults);%0A
     
@@ -1145,21 +1145,21 @@
 .handleS
-earch
+ubmit
 %7D%3E%0A     
@@ -1181,16 +1181,66 @@
 e=%22text%22
+ onChange=%7Bthis.onChange%7D value=%7Bthis.state.query%7D
 %3E%3C/input

Search with input text working. Yaaaaasssss