Created
October 29, 2018 10:32
-
-
Save mrzarkovic/6ccb291cc2e359fc7fe791f60577abea to your computer and use it in GitHub Desktop.
New react element
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
// Kreiranje React elementa | |
var Title = React.createElement( | |
'h1', | |
{className: 'main-title'}, | |
'Naslov' | |
); | |
// React bi napravio sledeći objekat | |
{ | |
type: 'h1', | |
props: { | |
className: 'main-title', | |
children: 'Naslov' | |
} | |
} | |
// HTML element bi izgledao ovako | |
<h1 class="main-title">Naslov</h1> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment