- Blogs contained on iostechnical.blogspot.com is for general information and educational purposes only.
- Information shared on this blog is my individual opinion and no intention to harm or mislead any individual.
- iOS Technical reserves the right to make additions, deletions, or modification to the contents on the Service at any time without prior notice.
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