Hello Guys, My name is Amanpreet Singh. I am senior iOS Developer from Delhi (India) having 4.5+ years of experience in mobile application development. I had created many apps from scratch in e-commerce, travel and education domain and had also worked on many maintenance projects. In part time, I love to share iOS programming related stuffs and latest news, updates on Apple products.
What are the life cycle methods of React Native Component? A component's life cycle in React Native can be divided into 4 phases: React Native Component life cycle phases Mounting: In this phase, component instance is created and inserted into the DOM. Updating: In updating phase, a react component is said to be born and it start growing by receiving new updates. Unmounting: In this phase, a react component gets removed from actual DOM. Error Handling: It is called when any error occurs while rendering the component. Now let's discuss about different methods that gets called during these phases. Mounting phase Below are the methods which gets called when instance of component is created and inserted into the DOM. Constructor() static getDerivedStateFromProps() render() ComponentDidMount() Constructor() constructor ( props ) { super ( props ) ; this . state = { employeeId : 0 } ; } It is first method which gets called in the ...
Comments
Post a Comment