<commit_before>import React from 'react'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'

import { getUser } from '../../actions/User'

class User extends React.Component {
  componentWillMount () {
    this._getUser()
  }

  _getUser () {
    const { getUser } = this.props
    getUser()
  }

  _renderLoading () {
    return (
      <div>Status: Loading</div>
    )
  }

  _renderError () {
    return (
      <div>Status: Error</div>
    )
  }

  _renderSuccess () {
    // return <div>{ this.props.user.payload.login }</div>
    return <div>Status: Success</div>
  }

  _renderPlaceholder () {
    return <div>Status: Placeholder</div>
  }

  render () {
    const { user: { fetching, error, success } } = this.props
    if (fetching) return this._renderLoading()
    if (error) return this._renderError()
    if (success) return this._renderSuccess()
    return this._renderPlaceholder()
  }
}

const mapStateToProps = state => {
  const { user } = state
  return { user }<commit_msg>Keep the User component simple.<commit_after>import React from 'react'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'

import { getUser } from '../../actions/User'

class User extends React.Component {
  componentWillMount () {
    const { getUser } = this.props
    getUser()
  }

  _renderLoading () {
    return (
      <div>Status: Loading</div>
    )
  }

  _renderError () {
    return (
      <div>Status: Error</div>
    )
  }

  _renderSuccess () {
    return <div>Status: Success</div>
  }

  _renderPlaceholder () {
    return <div>Status: Placeholder</div>
  }

  render () {
    const { user: { fetching, error, success } } = this.props
    if (fetching) return this._renderLoading()
    if (error) return this._renderError()
    if (success) return this._renderSuccess()
    return this._renderPlaceholder()
  }
}

const mapStateToProps = state => {
  const { user } = state
  return { user }
{'fraction_non_alphanumeric': 0.13506625891946994, 'fraction_numerical': 0.0, 'mean_word_length': 2.887128712871287, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, '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': '3488464', 'n_tokens_mistral': 633, 'n_tokens_neox': 621, 'n_words': 150}