前端
TheMonkeyKing_
这个作者很懒,什么都没留下…
展开
-
ES6的import和export
export语句可以导出本文件中定义的各种变量、类和方法等。const firstname = 'robin';const lastname = 'wieruch';export { firstname, lastname };import语句可以导入其他文件中export的内容:import { firstname, lastname } from './file1.js';console.log(firstname);// output: robinimport * as perso原创 2022-02-27 17:23:15 · 900 阅读 · 0 评论 -
React组件的生命周期
生命周期方法生命周期方法仅能被React ES6 类组件使用。挂载阶段有四个生命周期函数,执行顺序如下:constructor()componentWillMount()render()componentDidMount()更新组件时有五个生命周期方法,如下:componentWillReceiveProps()shouldComponentUpdate()componentWillUpdate()render()componentDidUpdate()卸载组件只有一个生命原创 2022-02-27 17:22:01 · 371 阅读 · 0 评论 -
React学习之道笔记-React基础入门
react学习之道读书笔记原创 2022-02-27 17:20:05 · 695 阅读 · 0 评论