zoukankan      html  css  js  c++  java
  • The first appliaction for "Hello World!"

    Each language in programing has it's own rules. For example, Java,node,php,python,angular,vue as well as react. Next come to with me to complete the application.

    Environment Building

    You can use yo,node and other packaging tools to build the environment. As I download before, so I can import them just like this.

    The structure is like this.

    Now let's start working with the API ReactDom.render(template,selector)

    You can treat it as a html template to build a react application.

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <link rel="stylesheet" href="../js/bootstrap.css">
        <script src="../js/react.js"></script>
        <script src="../js/react-dom.js"></script>
        <script src="../js/browser.js"></script>
        <title>React</title>
    </head>
    <body>
    <div id="example"></div>
    <script type="text/babel">
    </script>
    </body>
    </html>
    

    Hello World

    <div id="example"></div>
    <script type="text/babel">
        ReactDOM.render(
                <h1>Hello, world!</h1>,
            document.getElementById('example')
        );
    </script>
    
    

    Ok, you will find the result in chrome.

    You can change the world with your heart,even a lot of changes sometimes unless you won't geiv up....
  • 相关阅读:
    [UVA100] The 3n + 1 problem.题解
    [SP1] TEST
    LCA【模板】
    [P1000] 超级玛丽游戏.题解
    [P3367]【模板】并查集.题解
    并查集【模板】
    洛谷 P1890 【gcd区间】
    浅谈分块算法经典问题&优化
    Floyd算法详(cha)解
    逆序对
  • 原文地址:https://www.cnblogs.com/xiongwei2017/p/7350576.html
Copyright © 2011-2022 走看看