平安喜乐

欢愉且胜意,万事皆可期

vuePress-theme-reco 啃一口小胖安    2023
平安喜乐 平安喜乐

Choose mode

  • dark
  • auto
  • light
主页
分类
  • ECMAScript6+
  • category2
  • react
标签
时间轴
关于
  • GitHub (opens new window)
  • CSDN (opens new window)
  • 掘金 (opens new window)
  • vuepress (opens new window)
  • vuepress-theme-reco (opens new window)
author-avatar

啃一口小胖安

36

文章

4

标签

    主页
    分类
    • ECMAScript6+
    • category2
    • react
    标签
    时间轴
    关于
    • GitHub (opens new window)
    • CSDN (opens new window)
    • 掘金 (opens new window)
    • vuepress (opens new window)
    • vuepress-theme-reco (opens new window)
    • react入门
    • react评论框
    • state,props
    • react属于view
    • 函数传参
    • 组件格式,props通信
    • react使用样式
    • react使用分支if
    • for循环
    • 动态修改样式添加类名
    • 高级组件
    • /docs/react/双向数据绑定.html
    • async await

    函数传参

    vuePress-theme-reco 啃一口小胖安    2023

    函数传参

    啃一口小胖安 2018/6/4 react

    # 函数传参

    newname的值是从事件那里传过来的

    img.png

    两种方式传值

    img.png

    不过推荐用bind传值也就是绑定,bind(this传的是当前所指向的this,“传对应的名字”) img.png

    react属于view 组件格式,props通信