\n<\/p>\n

    国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

    ? ? ????? JS ???? ?? ?????? ??? ? ? ???? ?? ?????? ?? ??? ??(??? ?? ?? ??)

    ?? ?????? ??? ? ? ???? ?? ?????? ?? ??? ??(??? ?? ?? ??)

    Sep 11, 2018 pm 04:45 PM
    react ?? ??? ??

    React? "?? ??"?? "???" ? ??? ?????? ???? ?? JavaScript ??????, ?? ?? Facebook? ? ??????? ? ??? ??? ? ?????. ?? ??? ???????

    1. ??:

    1. ?????. ?? ????? ??????? ?? ????? ??? ???? React? ???? ??? ? ???? UI ????? ?????.

    2. ??? ???? ???? React? ????? F5? ???? ?? ?????. ???? ?? ??? ??? ???????. React? ??? ??? ?? ??? ??? ????. ??? React? ???? ?? ??? ??? ?? ?????. ???? ???? ?? ?? ?? ???, ??? ? ?? ??? ? ?????.

    ?? ?? ??? ???? ???.

    React? MVC ?????? ????.

    # ????#React? ???? ???? ????

    ??? ????? ?? ?????

    2 . ?? ??#???? #?? ? ???????? DOM ??? ????? ?? ??????? DOM ????? ????? ??? ?? ???. DOM? ?? ??? ??? ??? ?? React? ???? DOM ?? ?? DOM? ?????? ???? ??? ??? ?????. React? ???? ??? ?? ?? DOM?

    Virtual DOM

    ???. DOM? ??? ????, ??? ????? ??? ?????. ?? DOM? ? Virtual DOM? ?? ??????, ? Virtual DOM? ?? DOM? ????? ?????. ? ?? ?? DOM ?? ??? ?? ??? ? ??? ? ?? ??? ?????? React?? diff ????? ?? ?????. Virtual DOM? ??????? ?? ?? DOM? ?? ??? ?? ???? ??? ????. React? ??? ??? ?? ??? ??? ? ? diff ????? ???? ?? ? ?? ???? ?? ?? ?? ?????. ?? DOM? ?????? ?????. DOM ??? ??? ????? Virtual DOM??? commonent?? ???. Virtual DOM? ??? ?? ??? ??? ??? ?? ?? ?????.

    ??: React??? ?? ??? ??? ?? ?????. ?? ??? ??? DOM ??? ? ????? ??? ? ?? ?????.

    ?? ? ???React? ?? DOM? ???? ??, ?? ??? ????? ??, ??? ?? ? ??? ???? ??? ??? ????. State? Render? ?? ??? ??? ?????. ?? ???? ????? ???? ? ??? ?? ???? ???? ????. ???? ???? ?? ????? ?? Render? ?????. ??? ???? ??? setState ???? ???? ????? ? ????. ?? ?? ???? ??? ???: # ????#

    <!DOCTYPE html>
    <html>
    <head>
    <script src="http://fb.me/react-0.12.1.js"></script>
    <script src="http://fb.me/JSXTransformer-0.12.1.js"></script>
    </head>
    <body>
    <p id="example"></p>
    <script type="text/jsx">
    React.render(
    <h1>Hello, world!</h1>,
    document.getElementById(&#39;example&#39;)
    );
    </script>
    </body>
    </html>

    ????? ???? Hello, world!?? ??? ??? ?? ? ? ????.

    JSXTransformer.js? JSX ?? ??? ?????. JSX? Javascript? HTML ??? ??? ? ?? ?????. ??? ?? ??? React? ?? Javascript ???? ?????.

    (??? ??? ??? PHP ??? ????

    React ?? ???

    ?? ?????.)

    ? ?? ??:

    <html>
    <head>
    <title>Hello React</title>
    <script src="http://fb.me/react-0.12.1.js"></script>
    <script src="http://fb.me/JSXTransformer-0.12.1.js"></script>
    <script src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js"></script>
    <style>
    #content{
    width: 800px;
    margin: 0 auto;
    padding: 5px 10px;
    background-color:#eee;
    }
    .commentBox h1{
    background-color: #bbb;
    }
    .commentList{
    border: 1px solid yellow;
    padding:10px;
    }
    .commentList .comment{
    border: 1px solid #bbb;
    padding-left: 10px;
    margin-bottom:10px;
    }
    .commentList .commentAuthor{
    font-size: 20px;
    }
    .commentForm{
    margin-top: 20px;
    border: 1px solid red;
    padding:10px;
    }
    .commentForm textarea{
    width:100%;
    height:50px;
    margin:10px 0 10px 2px;
    }
    </style>
    </head>
    <body>
    <p id="content"></p>
    <script type="text/jsx">
    var staticData = [
    {author: "張飛", text: "我在寫一條評論~!"},
    {author: "關(guān)羽", text: "2貨,都知道你在寫的是一條評論。。"},
    {author: "劉備", text: "哎,咋跟這倆逗逼結(jié)拜了!"}
    ];
    var converter = new Showdown.converter();//markdown
    /** 組件結(jié)構(gòu):
    <CommentBox>
    <CommentList>
    <Comment />
    </CommentList>
    <CommentForm />
    </CommentBox>
    */
    //評論內(nèi)容組件
    var Comment = React.createClass({
    render: function (){
    var rawMarkup = converter.makeHtml(this.props.children.toString());
    return (
    <p className="comment">
    <h2 className="commentAuthor">
    {this.props.author}:
    </h2>
    <span dangerouslySetInnerHTML={{__html: rawMarkup}} />
    </p>
    );
    }
    });
    //評論列表組件
    var CommentList = React.createClass({
    render: function (){
    var commentNodes = this.props.data.map(function (comment){
    return (
    <Comment author={comment.author}>
    {comment.text}
    </Comment>
    );
    });
    return (
    <p className="commentList">
    {commentNodes}
    </p>
    );
    }
    });
    //評論表單組件
    var CommentForm = React.createClass({
    handleSubmit: function (e){
    e.preventDefault();
    var author = this.refs.author.getDOMNode().value.trim();
    var text = this.refs.text.getDOMNode().value.trim();
    if(!author || !text){
    return;
    }
    this.props.onCommentSubmit({author: author, text: text});
    this.refs.author.getDOMNode().value = &#39;&#39;;
    this.refs.text.getDOMNode().value = &#39;&#39;;
    return;
    },
    render: function (){
    return (
    <form className="commentForm" onSubmit={this.handleSubmit}>
    <input type="text" placeholder="Your name" ref="author" /><br/>
    <textarea type="text" placeholder="Say something..." ref="text" ></textarea><br/>
    <input type="submit" value="Post" />
    </form>
    );
    }
    });
    //評論塊組件
    var CommentBox = React.createClass({
    loadCommentsFromServer: function (){
    this.setState({data: staticData});
    /*
    # ????# ??? ???? ??? ???? ????.

    $.ajax({
    url: this.props.url + "?_t=" + new Date().valueOf(),
    dataType: &#39;json&#39;,
    success: function (data){
    this.setState({data: data});
    }.bind(this),
    error: function (xhr, status, err){
    console.error(this.props.url, status, err.toString());
    }.bind(this)
    });
    */
    },
    handleCommentSubmit: function (comment){
    //TODO: submit to the server and refresh the list
    var comments = this.state.data;
    var newComments = comments.concat([comment]);
    //這里也不向后端提交了
    staticData = newComments;
    this.setState({data: newComments});
    },
    //初始化 相當(dāng)于構(gòu)造函數(shù)
    getInitialState: function (){
    return {data: []};
    },
    //組件添加的時(shí)候運(yùn)行
    componentDidMount: function (){
    this.loadCommentsFromServer();
    this.interval = setInterval(this.loadCommentsFromServer, this.props.pollInterval);
    },
    //組件刪除的時(shí)候運(yùn)行
    componentWillUnmount: function() {
    clearInterval(this.interval);
    },
    //調(diào)用setState或者父級組件重新渲染不同的props時(shí)才會重新調(diào)用
    render: function (){
    return (
    <p className="commentBox">
    <h1>Comments</h1>
    <CommentList data={this.state.data}/>
    <CommentForm onCommentSubmit={this.handleCommentSubmit} />
    </p>
    );
    }
    });
    //當(dāng)前目錄需要有comments.json文件
    //這里定義屬性,如url、pollInterval,包含在props屬性中
    React.render(
    <CommentBox url="comments.json" pollInterval="2000" />,
    document.getElementById("content")
    );
    </script>
    </body>
    </html>

    ??:

    # ????#? ?? ???????. (??? ??? ??? PHP ??? ???? React ??? ??? ?? ?????.) ?? ???.

    ? ??? ?? ?????? ??? ? ? ???? ?? ?????? ?? ??? ??(??? ?? ?? ??)? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

    ? ????? ??
    ? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

    ? AI ??

    Undresser.AI Undress

    Undresser.AI Undress

    ???? ?? ??? ??? ?? AI ?? ?

    AI Clothes Remover

    AI Clothes Remover

    ???? ?? ???? ??? AI ?????.

    Video Face Swap

    Video Face Swap

    ??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

    ???

    ??? ??

    ???++7.3.1

    ???++7.3.1

    ???? ?? ?? ?? ???

    SublimeText3 ??? ??

    SublimeText3 ??? ??

    ??? ??, ???? ?? ????.

    ???? 13.0.1 ???

    ???? 13.0.1 ???

    ??? PHP ?? ?? ??

    ???? CS6

    ???? CS6

    ??? ? ?? ??

    SublimeText3 Mac ??

    SublimeText3 Mac ??

    ? ??? ?? ?? ?????(SublimeText3)

    ???

    ??? ??

    ??? ????
    1601
    29
    PHP ????
    1502
    276
    ???
    React vs. Vue : Netflix? ?? ??? ??? ?????? React vs. Vue : Netflix? ?? ??? ??? ?????? Apr 14, 2025 am 12:19 AM

    NetflixusesAcustomFrameworkCalled "Gibbon"BuiltonReact, NotreactorVuedirectly.1) TeamExperience : 2) ProjectComplexity : vueforsimplerProjects, 3) CustomizationNeeds : reactoffersmoreflex.4)

    React? ??? : ?????, ?? ? ?? ?? React? ??? : ?????, ?? ? ?? ?? Apr 18, 2025 am 12:23 AM

    React Ecosystem?? ??? ?? ????? (? : Redux), ??? ????? (? : Reactrouter), UI ?? ?? ????? (? : ?? -UI), ??? ?? (? : Jest) ? Webpack? ?? ?? ?? (? : Webpack)? ?????. ??? ??? ???? ??????? ????? ???? ???? ?? ?? ? ?? ???? ???? ? ??? ?? ?????.

    Netflix? ??? ?? : React (?? VUE)? ?? ?? ???? Netflix? ??? ?? : React (?? VUE)? ?? ?? ???? Apr 16, 2025 am 12:08 AM

    Netflix? React? ??? ?? ??? ??? ?????. 1) React? ?? ??? ? ?? ??? ??? ???? Netflix? ??? ?? ?????. 2) ?? ???? ?? Netflix? ??? ?????? ??? ????, ?? ?? ? ??? ??? ?? ?? ??? ??? ?????. 3) React? ?? DOM ? ?? ?? ????? ??? ??? ? ??? ?? ?? ??? ??????.

    React : ? ????? JavaScript ?????? ? React : ? ????? JavaScript ?????? ? Apr 18, 2025 am 12:25 AM

    React? Meta? ??? ?????? ???? ?? ?? ? JavaScript ??????? ??? ?? ?? ?? ? ?? DOM ?????. 1. ?? ?? ? ?? ?? : React? ?? ?? (?? ?? ???) ? ?? (? : usestate)? ?? ??? ???? ?? ??? ? ?? ??? ?????. 2. ?? DOM ? ?? ??? : ?? DOM? ?? ?? DOM? ????? ?????? ??? ??????. 3. ???? ? ?? : ?? (? : ???) ?? ?? ??? ????? ???? ??? ??? ?? ? ? ??????. 4. ?? ? : ?? Helloworld ?? ???? ?? ??? ? ?? (Usecontext ?

    React? ?? : ? ??? ???? ?? React? ?? : ? ??? ???? ?? Apr 19, 2025 am 12:22 AM

    React? ??? ??? ? ?? ?? ??, ?? ??? ? ?? ?? ???? ?? ??? ??? ? ????. 1) RECT? ?? ??? ?? ? ??? ?? ????? ??? ? ?? ?? ??? ?????. 2) ?? ???? ?? ??? ?? ?????? ??????. 3) React? ?? ??? ????? ?? GraphQL ? TypeScript? ?? ??? ?? ?? ? ????.

    React? ?? ??? ?? ?? : ?? ? ?? React? ?? ??? ?? ?? : ?? ? ?? Apr 17, 2025 am 12:25 AM

    React? ??? ???? ?????, ?? ??? ?? ?????. 1) ?? ?? ?? ??? ?? ??? ?? ??????. 2) ?? DOM ??? ?? ??? ??? ????? ?? ? ? ??? ??????. 3) ??? ???? ?? ?? ?????? ??? ?????. React? ??? ???? ????? ?????? ?? ??? ?? ??? ????? ????? ?? ?? ??? ??? ?????? ?? ? ? ????.

    React vs. ??? ??? ?? : ?? React vs. ??? ??? ?? : ?? Apr 13, 2025 am 12:06 AM

    React? ??? ?????? ?????? ??? ?? ??? ?????. ??? ??? ??? ?? ? ?? ????? ???? ? ?????. React? ?? ? ???? UI ????? ???? ??? ??? ??? ??? ??? ??? ???? ?????. ?? ??, ???? ?? ??, ? ?? ? ?? ?? ??? ?? ???????.

    React vs. ?? ??? ?? : ?? ?? ? ???? React vs. ?? ??? ?? : ?? ?? ? ???? Apr 17, 2025 am 12:23 AM

    React? ?? ??? ?? ????? ??? ??? ?????? ?????? JavaScript ????????. 1. React? ??? ?? ??? ? ?? DOM?? UI ??? ??? ??????. 2. VUE? ??? ? React? ? ????? ??? ?? ????? ??? ????? ?????. 3. Angular? ???? React? ? ??? ?? ?? ??? ???? ???? ??? ????? ?????.

    See all articles