This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>Hello World</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.12.2/react.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.12.2/JSXTransformer.js"></script> | |
</head> | |
<body> | |
<!--<script type="text/jsx">--> |
This file contains hidden or 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
/** | |
* Created by clarico on 29/04/2015. | |
*/ | |
var App = React.createClass({ | |
render:function(){ | |
return ( | |
<div> | |
<b>BOLD</b> | |
<h1>Hola</h1> | |
</div> |
This file contains hidden or 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
/** | |
* Created by clarico on 29/04/2015. | |
*/ | |
var App = React.createClass({ | |
getDefaultProps: function () { /*defaults*/ | |
return { | |
txt:'default :D', | |
cat: 404 | |
} | |
}, |
This file contains hidden or 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
/** | |
* Created by clarico on 29/04/2015. | |
*/ | |
var App; | |
App = React.createClass({ | |
getInitialState: function () { | |
return { | |
txt: "the state txt", | |
id: 0 | |
} |
This file contains hidden or 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
/** | |
* Created by clarico on 29/04/2015. | |
*/ | |
var App = React.createClass({ | |
getInitialState: function () { | |
return { | |
txt: "" | |
} | |
}, | |
update: function (e) { |
This file contains hidden or 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
/** | |
* Created by clarico on 29/04/2015. | |
*/ | |
var App = React.createClass({ | |
getInitialState: function () { | |
return { | |
red : 0, | |
blue : 0, | |
green : 0 | |
} |
This file contains hidden or 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
/** | |
* Created by clarico on 30/04/2015. | |
*/ | |
var App = React.createClass({ | |
render:function(){ | |
return <Button>I <Heart/> React</Button> | |
} | |
}); | |
var Button = React.createClass({ |
This file contains hidden or 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
/** | |
* Created by clarico on 30/04/2015. | |
*/ | |
var Button = React.createClass({ | |
getInitialState: function () { | |
return {val : 0} | |
}, | |
update : function () { | |
this.setState({val: this.state.val +1}); | |
}, |
This file contains hidden or 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
//see CONSOLE! | |
var votes = [ | |
"angular", | |
"angular", | |
"react", | |
"react", | |
"react", | |
"angular", | |
"ember", | |
"react", |
This file contains hidden or 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
public class MainClass { | |
public static void main(String[] args) { | |
java.util.Date utilDate = new java.util.Date(); | |
java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime()); | |
System.out.println("utilDate:" + utilDate); | |
System.out.println("sqlDate:" + sqlDate); | |
} |
OlderNewer