<commit_before>import React from 'react'
import { sparqlConnect } from '../sparql/configure-sparql'
import { LOADING, LOADED, FAILED } from 'sparql-connect'
import { browserHistory } from 'react-router'
import { uriToLink } from '../router-mapping'
import { connect } from 'react-redux'
import { changeKeyword } from '../actions/app-state'

function SearchInput({ keyword, changeKeyword }) {
  return (
    <span>
      Search everything :
      <input type="search" placeholder="Enter a keyword"
             name="search_input"
             value={keyword}
             onChange={e => changeKeyword(e.target.value)} />
      <button 
        onClick={() => browserHistory.push(uriToLink.searchItems(keyword))}>
        OK
      </button>
    </span>
  )
}

const mapStateToProps = state => ({ keyword: state.appState.keyword })
export default connect(mapStateToProps, { changeKeyword })(SearchInput)<commit_msg>Use stateful component for search input and remove appState reducer<commit_after>import React, { Component } from 'react'
import { sparqlConnect } from '../sparql/configure-sparql'
import { LOADING, LOADED, FAILED } from 'sparql-connect'
import { browserHistory } from 'react-router'
import { uriToLink } from '../router-mapping'
import { connect } from 'react-redux'

export default class SearchInput extends Component {
  
  constructor(props) {
    super(props)
    this.handleSubmit = () => 
      browserHistory.push(uriToLink.searchItems(this.refs.search.value))
  }
  
  render() {
    return (
      <span>
        Search everything :
        <input type="search" placeholder="Enter a keyword" ref="search" />
        <button onClick={this.handleSubmit}>
          OK
        </button>
      </span>
    )
  }
}

{'fraction_non_alphanumeric': 0.12694748990190421, 'fraction_numerical': 0.0, 'mean_word_length': 3.229268292682927, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '799709', 'n_tokens_mistral': 502, 'n_tokens_neox': 504, 'n_words': 124}