摘要: class Example extends React.Component { constructor() { super(); this.state = { val: 0 }; } componentDidMount() { this.setState({val: this.state.val + 阅读全文
posted @ 2021-11-23 20:44 LeoX的爬坑笔记 阅读(272) 评论(0) 推荐(0) 编辑
摘要: function instanceOf(left, right) { if (typeof left !== 'object' || left null) { return false; } while(true) { if (left null) { return false; } if (lef 阅读全文
posted @ 2021-11-23 16:26 LeoX的爬坑笔记 阅读(34) 评论(0) 推荐(0) 编辑
摘要: const vnode = { tag: 'DIV', attrs: { id: 'app' }, children: [{ tag: 'SPAN', children: [{ tag: 'A', children: [] }] }, { tag: 'SPAN', children: [{ tag: 阅读全文
posted @ 2021-11-23 16:18 LeoX的爬坑笔记 阅读(44) 评论(0) 推荐(0) 编辑