1<!-- v6 <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> -->
2<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
3<!-- Your custom script here -->
4<script type="text/babel">
1export default React.createClass({
2 getInitialState() {
3 return { num: this.getRandomNumber() };
4 },
5
6 getRandomNumber() {
7 return Math.ceil(Math.random() * 6);
8 },
9
10 render() {
11 return <div>
12 Your dice roll:
13 {this.state.num}
14 </div>;
15 }
16});
17Copy