![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
react
漠_silence_
这个作者很懒,什么都没留下…
展开
-
React杂粮
事件函数的三种绑定方式can = () => { //this.canconsole.log(“123”);}add(){//this.add.bind(this) ()=>this.add()console.log(456);}setState的第二个参数this.setState((name : “silence”),()=>{console.log(...原创 2019-07-17 18:07:44 · 99 阅读 · 0 评论 -
react 孙组件调用爷爷的属性
import React, { Component } from ‘react’const ThemeContext = React.createContext();export default class LifeCycle extends Component {static defaultProps = { name : "计数器"}constructor(props){ ...原创 2019-08-07 15:15:07 · 1127 阅读 · 0 评论