8, hands-on teaching react native actual combat Reactjs component life cycle

Source: Internet
Author: User


1. Creation Phase

Getdefaultprops: The default value for handling props is called in React.createclass

react jwt localstorage
2. Instantiation Phase

React.render (after
react redux node mongodb jwt authentication
Getinitialstate, Componentwillmount, Render, react jwt Componentdidmount

State : The properties of the component are primarily used to store the data required by the component itself, react jwt authentication and each time the data is updated by modifying the value of the State property, jwt and react the Reactjs internally listens for changes in the State property, Will actively trigger the component's Render method to update the virtual DOM structure

Virtual DOM: Map the real DOM structure into a JSON data structure


3. Update Phase

mainly occurs after the user action or the parent component has the update, jwt react express at this time according to the user's action behavior to make the corresponding page structure adjustment

Componentwillreceiveprops, Shouldcomponentupdate, Componentwillupdate, Render, Componentdidupdate

4. Destruction Phase

be called when destroying, react login jwt usually do some cancel the event binding, react native jwt remove the corresponding component data structure in the virtual DOM, destroy some invalid timer and so on work

Componentwillunmount


# #8, Matching video (): https://yunpan.cn/cYid89wLX5w3c access password 3f0d


8, hands-on teaching react native actual combat Reactjs component life cycle


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.