<commit_before>import './stylesheets/app.scss'

import React from 'react'
import ReactDOM from 'react-dom'
import {createStore} from 'redux'
import {Provider} from 'react-redux'

import rootReducer from './reducers/rootReducer'
import ResultsPage from './components/ResultsPage'

const store = createStore(rootReducer)

ReactDOM.render(
  <Provider store={store}>
    <ResultsPage />
  </Provider>,
  document.getElementById('content')
)<commit_msg>4. - connect state/dispatch to root<commit_after>import './stylesheets/app.scss'

import React from 'react'
import ReactDOM from 'react-dom'
import {createStore} from 'redux'
import {connect, Provider} from 'react-redux'

import rootReducer from './reducers/rootReducer'
import ResultsPage from './components/ResultsPage'

const mapStateToProps = state => state // We are just going to map state directly - no custom modifications
const mapDispatchToProps = dispatch => {return {dispatch: dispatch}} // Let's just pass dispatch directly to ResultsPage
const ConnectedResultsPage = connect(
  mapStateToProps,
  mapDispatchToProps
)(ResultsPage)

const store = createStore(rootReducer)

ReactDOM.render(
  <Provider store={store}>
    <ConnectedResultsPage />
  </Provider>,
  document.getElementById('content')
)
{'fraction_non_alphanumeric': 0.11022997620935765, 'fraction_numerical': 0.0007930214115781126, 'mean_word_length': 5.438775510204081, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '7208814', 'n_tokens_mistral': 368, 'n_tokens_neox': 356, 'n_words': 109}