Created
January 25, 2018 03:52
-
-
Save ivanalejandro0/1bd7fdcfaa4205cdb212a3d4e319dcd6 to your computer and use it in GitHub Desktop.
React + Ant Design single page/file example
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> | |
<meta charset="UTF-8" /> | |
<title>Hello World</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/antd/3.1.4/antd.css"> | |
<script src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
<script src="https://unpkg.com/[email protected]/babel.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.20.1/moment.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/antd/3.1.4/antd.js"></script> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script type="text/babel"> | |
const Button = antd.Button; | |
class App extends React.PureComponent { | |
render() { | |
return ( | |
<div> | |
<h1>Hello, world!</h1> | |
<Button>Test Button</Button> | |
</div> | |
); | |
} | |
} | |
ReactDOM.render(<App />, document.getElementById('root')); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment