handleChange(event) {
    var query = event.target.value;
    var url = 'https://en.wikipedia.org/w/api.php?action=opensearch&search=' +
      query + '&limit=10&namespace=0&format=json';

    $.ajax({
      url: url,
      method: 'GET',
      dataType: 'jsonp',
      headers: { 'Api-User-Agent': 'WikiViewer/1.0' },
      success: function(data) {
        this.setState({list: data}); // Sets api results to "list" state
      }.bind(this)
    });
  }
// Pulls form input and queries wikipedia's api
Pulls form input and queries wikipedia's api
Pulls form input and queries wikipedia ' s api
handleChange(event) {
    var query = event.target.value;
    var url = 'https://en.wikipedia.org/w/api.php?action=opensearch&search=' +
      query + '&limit=10&namespace=0&format=json';
    $.ajax({
      url: url,
      method: 'GET',
      dataType: 'jsonp',
      headers: { 'Api-User-Agent': 'WikiViewer/1.0' },
      success: function(data) {
        this.setState({list: data}); 
      }.bind(this)
    });
  }
handleChange ( event ) { var query = event . target . value ; var url = 'https://en.wikipedia.org/w/api.php?action=opensearch&search=' + query + '&limit=10&namespace=0&format=json' ; $ . ajax ( { url : url , method : 'GET' , dataType : 'jsonp' , headers : { 'Api-User-Agent' : 'WikiViewer/1.0' } , success : function ( data ) { this . setState ( { list : data } ) ; } . bind ( this ) } ) ; }
Pulls form input and queries wikipedia's api
Pulls form input and queries wikipedia ' s api
// Sets api results to "list" state