You need to sign in to do that
Don't have an account?
Rohit Tripathi
Sample REACT code
Can anyone help me with a simple sample code in Visual Force which uses REACT. I am trying to use react in VF but it is not rendering any component.
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Using '//foo.js' the browser will choose the correct http/https endpoint
All Answers
Thanks for getting back to me. Here is my code :
<apex:page docType="html-5.0" sidebar="false" showHeader="false">
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<Script src="http://fb.me/react-0.12.2.js"/>
<Script src="http://fb.me/JSXTransformer-0.12.2.js"/>
<script type="text/jsx">
var Rep = React.createClass({
render: function(){
return(
<div>
<iframe width="400" height="300" src="https://www.youtube.com/embed/GZdLudjkJSY"></iframe>
</div>
);
}
});
var RecipeBook = React.createClass({
render: function() {
return (
<div>
<div>
Hello, world! I am a RecipeBook.
<h4> My first REACT </h4>
</div>
<Rep/>
</div>
);
}
});
React.render(
<RecipeBook/>,
document.getElementById('app-container'));
</script>
</head>
<body>
<div id="app-container">
</div>
<div> <h2> hello </h2> </div>
</body>
</html>
</apex:page>
Using '//foo.js' the browser will choose the correct http/https endpoint