Skip to content

Instantly share code, notes, and snippets.

@RyanAtViceSoftware
Last active May 29, 2017 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save RyanAtViceSoftware/e1ae6af2b5b3744fd59f to your computer and use it in GitHub Desktop.
Save RyanAtViceSoftware/e1ae6af2b5b3744fd59f to your computer and use it in GitHub Desktop.
Hello React Render Method - fixed - use parentheses allow for better formatting. JsFiddle: http://jsfiddle.net/gh/gist/library/pure/e1ae6af2b5b3744fd59f/
<script src="https://fb.me/react-with-addons-0.14.0.js"></script>
<script src="https://fb.me/react-dom-0.14.0.js"></script>
<div id="view"/>
var HelloReact = React.createClass({
render: function() {
return ( // works: because parentheses allow for starting on next line
<div>
<div>Hello React</div>
<div>How are you?</div>
</div>
);
}
});
ReactDOM.render(<HelloReact/>, document.getElementById('view'));
name: ReactJs example by Ryan Vice - www.ViceSoftware.com
description: First JsFiddle from a Gist v2
authors: Hello React Render Method - fixed - use parentheses allow for better formatting.
- Ryan Vice
resources:
normalize_css: no
wrap: h
panel_js: 3
panel_css: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment