<commit_before>// Native React Components
import React from 'react'
import ReactDOM from 'react-dom'
import { BrowserRouter,Router, Route, Match, IndexRoute, browserHistory } from 'react-router'

// Nav Views
import Header from './components/header'
import GameMenu from './components/gamemenu'
import LeaderBoard from './components/leaderboard'
import Settings from './components/settings'
import Preferences from './components/preferences'

// games
import GameOne from './components/gameone'
import GameTwo from './components/gametwo'
import GameThree from './components/gamethree'

const appTarget = document.getElementById('app');
// Component names should always begin with an uppercase letter
// state = owned by current component
// props = handed down from parent component
/* use an underscore as a prefix for custom functions
   // custom function
   _clickHandler(){} 
   // native method to react    
   componentDidMount(){}
*/

// render the app
ReactDOM.render((
  <Router history={browserHistory}>
    <Route path="/" component={Header}>
      <IndexRoute component={GameMenu} />      
      <Route path="leaderboard" component={LeaderBoard} />
      <Route path="settings" component={Settings} />
      <Route path="preferences" component={Preferences} />
      <Route path="gameone" component={GameOne} />
      <Route path="gametwo" component={GameTwo} />
      <Route path="gamethree" component={GameThree} />
    </Route>
  </Router>),
appTarget);<commit_msg>changed app to rendeer as a single component<commit_after>// Native React Components
import React from 'react'
import ReactDOM from 'react-dom'
import { Router, Route, IndexRoute, browserHistory } from 'react-router'

// Nav Views
import Header from './components/header'
import GameMenu from './components/gamemenu'
import LeaderBoard from './components/leaderboard'
import Settings from './components/settings'
import Preferences from './components/preferences'

// games
import GameOne from './components/gameone'
import GameTwo from './components/gametwo'
import GameThree from './components/gamethree'

const appTarget = document.getElementById('app');
// Component names should always begin with an uppercase letter
// state = owned by current component
// props = handed down from parent component
/* use an underscore as a prefix for custom functions
   // custom function
   _clickHandler(){} 
   // native method to react    
   componentDidMount(){}
*/
class App extends React.Component{
  render(){
    return(
      <Router history={browserHistory}>
        <Route path="/" component={Header}>
          <IndexRoute component={GameMenu} />      
          <Route path="leaderboard" component={LeaderBoard} />
          <Route path="settings" component={Settings} />
          <Route path="preferences" component={Preferences} />
          <Route path="gameone" component={GameOne} />
          <Route path="gametwo" component={GameTwo} />
          <Route path="gamethree" component={GameThree} />
        </Route>
      </Router>
    )
  }
}

// render the app
ReactDOM.render((<App />),appTarget);
{'fraction_non_alphanumeric': 0.12221144519883609, 'fraction_numerical': 0.0, 'mean_word_length': 3.7746913580246915, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, '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': '352487', 'n_tokens_mistral': 813, 'n_tokens_neox': 801, 'n_words': 265}