<commit_before>import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import { fetchLibraryIfNeeded, invalidateLibrary } from '../actions'
import Library from '../components/Library'

class App extends Component {
  constructor(props) {
    super(props)
  }

  componentDidMount() {
    const { dispatch } = this.props
    dispatch(fetchLibraryIfNeeded())
  }

  render() {
    const { library } = this.props
    return (
      <div>
        <Library isFetching={library.isFetching} items={library.items} />
      </div>
    )
  }
}

App.propTypes = {
  library: PropTypes.object.isRequired,
  dispatch: PropTypes.func.isRequired
}

function mapStateToProps(state) {
  const { library } = state

  return {
    library
  }
}

export default connect(mapStateToProps)(App)
<commit_msg>Pass props to Library with spread syntax<commit_after>import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import { fetchLibraryIfNeeded, invalidateLibrary } from '../actions'
import Library from '../components/Library'

class App extends Component {
  constructor(props) {
    super(props)
  }

  componentDidMount() {
    const { dispatch } = this.props
    dispatch(fetchLibraryIfNeeded())
  }

  render() {
    const { library } = this.props
    return (
      <div>
        <Library { ...library } />
      </div>
    )
  }
}

App.propTypes = {
  library: PropTypes.object.isRequired,
  dispatch: PropTypes.func.isRequired
}

function mapStateToProps(state) {
  const { library } = state

  return {
    library
  }
}

export default connect(mapStateToProps)(App)

{'fraction_non_alphanumeric': 0.1188423645320197, 'fraction_numerical': 0.0, 'mean_word_length': 3.310344827586207, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7210185', 'n_tokens_mistral': 491, 'n_tokens_neox': 492, 'n_words': 115}