React学习案例十九
Posted hhh江月
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了React学习案例十九相关的知识,希望对你有一定的参考价值。
React学习案例十九
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>菜鸟教程 React 实例</title>
<script src="https://cdn.staticfile.org/react/16.4.0/umd/react.development.js"></script>
<script src="https://cdn.staticfile.org/react-dom/16.4.0/umd/react-dom.development.js"></script>
<script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script>
</head>
<body>
<div id="example"></div>
<script type="text/babel">
class HelloMessage extends React.Component
render()
return (
<h1>Hello, this.props.name</h1>
);
HelloMessage.defaultProps =
name: 'Runoob'
;
const element = <HelloMessage/>;
ReactDOM.render(
element,
document.getElementById('example')
);
</script>
</body>
</html>
<!-- <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>菜鸟教程 React 实例</title>
<script src="https://cdn.staticfile.org/react/16.4.0/umd/react.development.js"></script>
<script src="https://cdn.staticfile.org/react-dom/16.4.0/umd/react-dom.development.js"></script>
<script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script>
</head>
<body>
<div id="example"></div>
<script type="text/babel">
class HelloMessage extends React.Component
render()
return (
<h1>Hello, this.props.name</h1>
);
HelloMessage.defaultProps =
name: 'Runoob'
;
const element = <HelloMessage/>;
ReactDOM.render(
element,
document.getElementById('example')
);
</script>
</body>
</html> -->
<!-- <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>菜鸟教程 React 实例</title>
</head>
<body>
<div id="example"></div>
<script type="text/babel">
class HelloMessage extends React.Component
render()
return (
<h1>Hello, this.props.name</h1>
);
HelloMessage.defaultProps =
name: 'Runoob'
;
const element = <HelloMessage/>;
ReactDOM.render(
element,
document.getElementById('example')
);
</script>
</body>
</html> -->
以上是关于React学习案例十九的主要内容,如果未能解决你的问题,请参考以下文章
Java开发学习(十九)----AOP环绕通知案例之密码数据兼容处理
机器学习实战应用案例100篇(十九)-鲸鱼算法从原理到实战应用