Skip to content

Instantly share code, notes, and snippets.

@nhoxbypass
Last active December 11, 2017 13:49
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 nhoxbypass/b108532e7c63850b170217aa044eb169 to your computer and use it in GitHub Desktop.
Save nhoxbypass/b108532e7c63850b170217aa044eb169 to your computer and use it in GitHub Desktop.
//ReactJs
var HelloMessage = React.createClass({
render: function() {
return <div>Hello {this.props.name}</div>;
}
});
ReactDOM.render(<HelloMessage name="Hieu Tam" />, mountNode);
//React Native
class HelloMessage extends Component {
render() {
return (
<View><Text>Hello {this.props.name}</Text></View>
);}
}
AppRegistry.registerComponent('Hieu Tam', () => HelloMessage);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment