上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 61 下一页
摘要: import React, { PureComponent } from 'react' export default class App extends PureComponent { constructor(props){ super(props) this.state = { username 阅读全文
posted @ 2021-08-12 15:06 13522679763-任国强 阅读(101) 评论(0) 推荐(0)
摘要: import React, { PureComponent,createRef } from 'react' class Counter extends PureComponent { constructor(props){ super(props) this.state = { counter:0 阅读全文
posted @ 2021-08-12 14:15 13522679763-任国强 阅读(96) 评论(0) 推荐(0)
摘要: import React, { PureComponent } from 'react' import {EventEmitter} from 'events'; // yarn add events // 事件总线 event bus const eventBus = new EventEmitt 阅读全文
posted @ 2021-08-12 11:54 13522679763-任国强 阅读(85) 评论(0) 推荐(0)
摘要: import React, { PureComponent } from 'react' export default class App extends PureComponent { constructor(props){ super(props) this.state = { friends: 阅读全文
posted @ 2021-08-12 10:54 13522679763-任国强 阅读(53) 评论(0) 推荐(0)
摘要: function wxToPromise(method, options = {}) { return new Promise((resolve, reject) => { options.success = resolve options.fail = err => { reject(err) } 阅读全文
posted @ 2021-08-11 21:55 13522679763-任国强 阅读(310) 评论(0) 推荐(0)
摘要: import React, { Component } from 'react' export default class App extends Component { constructor(props){ super(props) this.state = { counter:0, name: 阅读全文
posted @ 2021-08-11 17:29 13522679763-任国强 阅读(227) 评论(0) 推荐(0)
摘要: import React, { Component } from 'react' export default class App extends Component { constructor(props){ super(props) this.state = { counter:0 } } re 阅读全文
posted @ 2021-08-11 17:02 13522679763-任国强 阅读(268) 评论(0) 推荐(0)
摘要: import React, { Component } from 'react' export default class App extends Component { constructor(props){ super(props) this.state = { counter:0 } } re 阅读全文
posted @ 2021-08-11 16:33 13522679763-任国强 阅读(327) 评论(0) 推荐(0)
摘要: import React, { Component } from 'react' const userContext = React.createContext({ nickname:'AAA', level:0 }) class ProfileHeader extends Component{ r 阅读全文
posted @ 2021-08-11 14:40 13522679763-任国强 阅读(36) 评论(0) 推荐(0)
摘要: import React, { Component } from 'react' // props 从上向下一层一层传递 function ProfileHeader(props){ console.log(props); return ( <div> <h2>用户昵称: {props.nickna 阅读全文
posted @ 2021-08-11 14:27 13522679763-任国强 阅读(42) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 61 下一页