Last active
November 1, 2018 09:04
-
-
Save mrzarkovic/a530ad0c7fd66c3285855f400af5f16a to your computer and use it in GitHub Desktop.
New class component
This file contains 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
var TitleComponent = React.createClass({ | |
render: function () { | |
return React.createElement('h1', {className: 'main-title'}, this.props.title); | |
// Ili JSX sintaksa: | |
return <h1 className="main-title">{this.props.title}</h1>; | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment