Skip to content

Instantly share code, notes, and snippets.

@qvil
Created June 26, 2017 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qvil/3065e883091dfa003a3d2c1b96638863 to your computer and use it in GitHub Desktop.
Save qvil/3065e883091dfa003a3d2c1b96638863 to your computer and use it in GitHub Desktop.
For react-tutorial
import React, { Component } from 'react';
class Body extends Component {
constructor(props) {
super(props);
this.state = {
number: 1
};
}
render() {
return (
<div>
<h2>Body Props Number : {this.props.number}</h2>
<h2>Body State Number : {this.state.number}</h2>
</div>
);
}
}
export default Body;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment