zoukankan      html  css  js  c++  java
  • jsx语法简介

    实际上,JSX 仅仅只是 React.createElement(component, props, ...children) 函数的语法糖。

    https://zh-hans.reactjs.org/docs/jsx-in-depth.html

    <Provider store={this.state.store}>

     <Root />

    </Provider>

    return React.createElement(Provider, {

        store: this.state.store

      }, React.createElement(Root, null));

    https://babeljs.io/repl/#?babili=false&browsers=&build=&builtIns=false&spec=false&loose=false&code_lz=GYVwdgxgLglg9mABACwKYBt1wBQEpEDeAUIogE6pQhlICQ9APAAplwBuMAJqmYgM5Q4FALwEoyGHwB0AgIZRUMwRQC-APiL1GAJThwoiAPQatDQy3ZceagNxEVRIA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=react&prettier=false&targets=&version=7.5.4&externalPlugins=

    <MyButton color="blue" shadowSize={2}>

      Click Me

    </MyButton>

    React.createElement(

      MyButton,

      {color: 'blue', shadowSize: 2},

      'Click Me'

    )

  • 相关阅读:
    相机
    播放音乐
    录音
    NSURLConnection下载
    UITableView
    UIPageControl
    UIScrollView
    ajax禁止浏览器缓存
    java替换word2003
    退出登录
  • 原文地址:https://www.cnblogs.com/feng9exe/p/11166033.html
Copyright © 2011-2022 走看看