<commit_before>import React, {Component} from 'react'
import {StyleSheet, View} from 'react-native'
import TabButton from './TabButton'

export default class extends Component {
	state = {activeTab: 0}

	render = () => (
		<View style={{flex: 1}}>
			{this.props.tabs.length < 2 ? null :
				<View style={Styles.tabWrapper}>
					{
						this.props.tabs.map(({title}, key) => (
							<TabButton
								key={key}
								index={key}
								text={title}
								activeTab={this.state.activeTab}
								changeTab={this.changeTab.bind(this)}
							/>
						))
					}
				</View>
			}<commit_msg>Get key for changeTab from TabButton rather than passing into arrow function<commit_after>import React, {Component} from 'react'
import {StyleSheet, View} from 'react-native'
import TabButton from './TabButton'

export default class extends Component {
	state = {activeTab: 0}

	render = () => (
		<View style={{flex: 1}}>
			{this.props.tabs.length < 2 ? null :
				<View style={Styles.tabWrapper}>
					{
						this.props.tabs.map(({title}, key) => (
							<TabButton
								key={key}
								index={key}
								text={title}
								activeTab={this.state.activeTab}
								changeTab={this.changeTab}
							/>
						))
					}
				</View>
			}
{'fraction_non_alphanumeric': 0.1487138263665595, 'fraction_numerical': 0.00482315112540193, 'mean_word_length': 2.608695652173913, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '1766769', 'n_tokens_mistral': 548, 'n_tokens_neox': 390, 'n_words': 91}