Skip to content

Instantly share code, notes, and snippets.

@shafiqshams
Created April 11, 2017 08:59
Show Gist options
  • Save shafiqshams/b221f32d9e67242279ec672dde49ed64 to your computer and use it in GitHub Desktop.
Save shafiqshams/b221f32d9e67242279ec672dde49ed64 to your computer and use it in GitHub Desktop.
Refactored to Class Based Component.
import React, { Component } from 'react';
import { Text, View } from 'react-native';
class AlbumList extends Component {
render() {
return (
<View>
<Text> AlbumList!!! </Text>
</View>
);
}
}
export default AlbumList;
@shafiqshams
Copy link
Author

Benefits of class based components, Unique advantage over functional components..
called LifeCycle Methods
In functional some data goes in and JSX comes out. but in ClassBased: which have alot more knowledge k kab render hona hai kab remove hona hai.. and notification can be received.
One of the LC method is componentWillMount()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment