Skip to content

Instantly share code, notes, and snippets.

View RyanAtViceSoftware's full-sized avatar

Ryan Vice RyanAtViceSoftware

View GitHub Profile
@RyanAtViceSoftware
RyanAtViceSoftware / fiddle.html
Last active December 10, 2015 14:15
Hello React Render Method - broken - use parentheses allow for better formatting. JsFiddle: http://jsfiddle.net/gh/gist/library/pure/bda749025dff22cae766/
<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"/>
@RyanAtViceSoftware
RyanAtViceSoftware / hello-react-render-method-broken.html
Last active September 12, 2015 13:53
Hello React Render Method - Paste the code below into https://facebook.github.io/react/jsx-compiler.html to see why you must have only a single root element in your JSX.
var HelloMessage = React.createClass({
render: function() {
return <div>Hello React</div> // error: must return a single node
<div>How are you?</div>
}
});
React.render(<HelloMessage/>, mountNode);
@RyanAtViceSoftware
RyanAtViceSoftware / hello-react-jsx.html
Last active July 18, 2019 16:16
Hello React JSX - Hello World with ReactJs 1.3 and JSX
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Hello React</title>
<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>
<script src="http://fb.me/JSXTransformer-0.13.1.js"></script>
</head>
<body>
@RyanAtViceSoftware
RyanAtViceSoftware / hello-react.html
Last active July 18, 2019 16:12
Hello React - Hello World in ReactJs 1.3 without using JSX
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Hello React</title>
<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>
</head>
<body>
<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"/>