Last active
December 11, 2017 13:49
-
-
Save nhoxbypass/b108532e7c63850b170217aa044eb169 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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