Created
July 1, 2016 08:54
-
-
Save ehrudxo/35105441ea195edfbf1bfffea9adb820 to your computer and use it in GitHub Desktop.
REACT.createClass
This file contains 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
<a href="#" id="ReactCreateClass">React.createClass</a> |
This file contains 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
function ReactCreateClass(){ | |
var ReactComponent = React.createClass({ | |
render(){ | |
return( | |
<div>React Create Class</div> | |
); | |
} | |
}); | |
console.dir(ReactComponent); | |
ReactDOM.render(<ReactComponent/>,document.getElementById("app")); | |
} | |
$('#ReactCreateClass').click(ReactCreateClass); | |
//실제 프로젝트를 하면서 jQuery를 쓸 일은 없을 수도 있겠지만 스터디를 위해서는 꽤나 유용합니다. (jsfiddle 확인.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment