Commit 5dddbe28 authored by Afid's avatar Afid

event ketika halaman dibuka kembali

parent 3ee6baaf
......@@ -41,6 +41,14 @@ class Account extends React.Component {
componentDidMount() {
this._getPermissions()
this._unsubscribe = this.props.navigation.addListener('focus', () => {
// do something
console.log('DISINI DI RELOAD ULANG "ACCOUNT"')
});
}
componentWillUnmount() {
this._unsubscribe();
}
_getPermissions = async () => {
......
......@@ -33,8 +33,15 @@ class Home extends React.Component {
this._getPermissions()
this._renderCarousell()
this._account();
this._unsubscribe = this.props.navigation.addListener('focus', () => {
// do something
console.log('DISINI DI RELOAD ULANG "HOME"')
});
}
componentWillUnmount() {
this._unsubscribe();
}
_getPermissions = async () => {
let { status } = await Permissions.askAsync(Permissions.LOCATION);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment