<commit_before>import React, { Component } from 'react'
import { connect } from 'react-redux'
import * as actionCreators from '../redux/action_creators'



class NewPage extends Component {
    static get contextTypes() {
        return { router: React.PropTypes.object.isRequired }
    }

    render() {
        return (
            <div>
                <input type="text" onChange={e => this.props.setGreeting(e.target.value)} />

                <div>Yay a new page</div>
                <button onClick={() => this.context.router.goBack()}>Go back</button>
                <button onClick={() => this.context.router.push('/')}>Go to Hello</button>
            </div>
        )
    }
}

export default connect(<commit_msg>In newpage added ability to change greeting from text input. saved local state onChange and then saved to store when save button is pushed.<commit_after>import React, { Component } from 'react'
import { connect } from 'react-redux'
import * as actionCreators from '../redux/action_creators'



class NewPage extends Component {
    constructor(props) {
        super(props);

        this.setGreeting = this.setGreeting.bind(this);

        this.state = {
            greeting: 'Hello Olio',
        }
    }

    static get contextTypes() {
        return { router: React.PropTypes.object.isRequired }
    }

    setGreeting(e) {
        this.setState({ greeting: e.target.value })
    }


    render() {
        return (
            <div>

                <div>Yay a new page</div>
                <h4>{this.state.greeting}</h4>

                <h6>{this.props.hello.greeting}</h6>

                <h3>Enterer New Greeting: </h3>

                <input type="text" onChange={this.setGreeting} />

                <button onClick={() => this.context.router.goBack()}>Go back</button>

                <button onClick={() => this.props.setGreeting(this.state.greeting)}>Save</button>

            </div>
        )
    }
}

export default connect(
{'fraction_non_alphanumeric': 0.13069908814589665, 'fraction_numerical': 0.00303951367781155, 'mean_word_length': 2.1053459119496853, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 32, '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': '5733510', 'n_tokens_mistral': 582, 'n_tokens_neox': 569, 'n_words': 133}