React学习案例十二

Posted hhh江月

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了React学习案例十二相关的知识,希望对你有一定的参考价值。

React学习案例十二

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello 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 Clock extends React.Component 
  constructor(props) 
    super(props);
    this.state = date: new Date();
  

  render() 
    return (
      <div>
        <h1>Hello, world!</h1>
        <h2>现在是 this.state.date.toLocaleTimeString().</h2>
      </div>
    );
  


ReactDOM.render(
  <Clock />,
  document.getElementById('example')
);
</script>

</body>
</html>

<!-- <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello 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 Clock extends React.Component 
  constructor(props) 
    super(props);
    this.state = date: new Date();
  

  render() 
    return (
      <div>
        <h1>Hello, world!</h1>
        <h2>现在是 this.state.date.toLocaleTimeString().</h2>
      </div>
    );
  


ReactDOM.render(
  <Clock />,
  document.getElementById('example')
);
</script>

</body>
</html> -->


<!-- <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello 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 Clock extends React.Component 
  constructor(props) 
    super(props);
    this.state = date: new Date();
  

  render() 
    return (
      <div>
        <h1>Hello, world!</h1>
        <h2>现在是 this.state.date.toLocaleTimeString().</h2>
      </div>
    );
  


ReactDOM.render(
  <Clock />,
  document.getElementById('example')
);
</script>

</body>
</html> -->



<!-- <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello 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 Clock extends React.Component 
  constructor(props) 
    super(props);
    this.state = date: new Date();
  

  render() 
    return (
      <div>
        <h1>Hello, world!</h1>
        <h2>现在是 this.state.date.toLocaleTimeString().</h2>
      </div>
    );
  


ReactDOM.render(
  <Clock />,
  document.getElementById('example')
);
</script>

</body>
</html> -->

以上是关于React学习案例十二的主要内容,如果未能解决你的问题,请参考以下文章

《SAS编程与数据挖掘商业案例》学习笔记之十二

Linux学习笔记(三十二)iptables filter表案例 iptables nat表应用

React 系列十二:React - Router

Python爬虫(二十二)_selenium案例:模拟登陆豆瓣

Python爬虫(二十二)_selenium案例:模拟登陆豆瓣

React学习案例九