webpack
javascript
react js
6 years, 4 months ago
//Basic way
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react-dom.js"></script>
<title>Basic way</title>
</head>
<body>
<div class="" id="app">
<script type="text/javascript">
ReactDOM.render(
React.createElement('h1',null,'hello world'),document.getElementById('app')
)
</script>
</div>
</body>
</html>
//With jsx format
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.2/browser.min.js"> </script>
<title>JSX syntax</title>
</head>
<body>
<div class="" id="app">
<script type="text/babel">
ReactDOM.render(
<h1>hello</h1>,document.getElementById('app')
)
</script>
</div>
</body>
</html>
0 Comments
Please Login to Comment Here