建立前 beforeCreatevue
建立 createreact
挂载前 beforeMountajax
挂载 mounted服务器
更新前 beforeUpdateapp
更新 updatedthis
销毁前 beforeDestroyedspa
销毁 destoryedcomponent
methods --方法orm
-----------------------------------华丽的分割线-------------------------生命周期
一个React组件的生命周期分为三个部分:挂载期(Mounting)、存在更新期(Updating)和销毁时(Unmounting)。
在 componentDidMount方法中放ajax请求--服务器会根据变量渲染, Constructor中设置变量初始化
若是你以为个人文章对您有帮助,给点鼓励,谢谢