<commit_before><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name=description content="">
	<meta name=viewport content="width=device-width, initial-scale=1">
	<title>Get Initial State</title>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.0-beta.1/react.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.0-beta.1/JSXTransformer.js"></script>
</head>
<body>
	<script type="text/jsx">
	/** @jsx React.DOM */
	var APP = React.createClass({
		getDefaultProps:function() {
			return {
				txt:'',
				cat:0
			};
		},		
		propTypes:{
			txt:React.PropTypes.string,
			cat:React.PropTypes.number.isRequired
		},		
		render: function() {
			console.log(this.props.txt);
			return (
				<div>
					<h1>{this.props.txt}</h1>
					<b>bold</b>
				</div>
			);
		}
	});

	React.render(<APP cat={5} txt="this is the txt prop"/>, document.body);
	</script>
</body>
</html><commit_msg>Lesson4 use state properties<commit_after><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name=description content="">
	<meta name=viewport content="width=device-width, initial-scale=1">
	<title>Get Initial State</title>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.0-beta.1/react.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.0-beta.1/JSXTransformer.js"></script>
</head>
<body>
	<script type="text/jsx">
	/** @jsx React.DOM */
	var APP = React.createClass({
		getInitialState: function() {
			return {
				txt: 'this is my state txt'
			}
		},
		render: function() {
			return (
				<div>
					<h1>{this.state.txt}</h1>
					<b>bold</b>
				</div>
			);
		}
	});

	React.render(<APP cat={5} txt="this is the txt prop"/>, document.body);
	</script>
</body>
</html>
{'fraction_non_alphanumeric': 0.20749440715883669, 'fraction_numerical': 0.017897091722595078, 'mean_word_length': 3.671018276762402, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 4, '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': '2860538', 'n_tokens_mistral': 782, 'n_tokens_neox': 685, 'n_words': 115}