<commit_before>import React from 'react' // required for JSX
import { render } from 'react-dom'
import App from './components/App'


var contacts = [
  { name: "John" },
  { name: "Lilian", friend: true },
  { name: "Thomas", friend: true },
  { name: "Bruno", friend: true },
  { name: "Nicolas", friend: true }
]

var root = <App initialContacts={ contacts } />
render(root, document.getElementById('app'))<commit_msg>15: outside → app (example with async data fetching)<commit_after>import React from 'react' // required for JSX
import { render } from 'react-dom'
import App from './components/App'


var root = <App initialContacts={ [] } />
var app = render(root, document.getElementById('app'))

// Asynchronously load data
setTimeout(() => app.setState({contacts: [
  { name: "John" },
  { name: "Lilian", friend: true },
  { name: "Thomas", friend: true },
  { name: "Bruno", friend: true },
  { name: "Nicolas", friend: true }
]}), 500)
{'fraction_non_alphanumeric': 0.1746031746031746, 'fraction_numerical': 0.005291005291005291, 'mean_word_length': 4.197802197802198, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '5844886', 'n_tokens_mistral': 312, 'n_tokens_neox': 299, 'n_words': 96}