Skip to content

Instantly share code, notes, and snippets.

@lricoy
Last active February 6, 2018 00:51
Show Gist options
  • Save lricoy/78ac2050a850c63f3661373dcba46cb1 to your computer and use it in GitHub Desktop.
Save lricoy/78ac2050a850c63f3661373dcba46cb1 to your computer and use it in GitHub Desktop.
React Component with JSX
<!DOCTYPE html>
<html>
<script src="https://fb.me/react-with-addons-15.1.0.js"></script>
<script src="https://fb.me/react-dom-15.1.0.js"></script>
<script src="https://unpkg.com/babel-standalone@6.26.0/babel.js"></script>
<body>
<div id="myApp"></div>
<script type="text/babel">
const rootElement = document.getElementById('myApp')
const Message = (
<span className="stylish-message">
React com JSX
</span>
)
ReactDOM.render(Message, rootElement);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment