리액트네이티브 react-native-navigation V2 LifeCycle #4
리액트네이티브 react-native-navigation V2 LifeCycle #4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
import React, {Component} from "react" ; import { View, Text, StyleSheet, Button } from "react-native" ; import {Navigation} from "react-native-navigation" ; class SignIn extends Component { constructor (props) { super(props); Navigation.events().bindComponent(this); this.state = { text : 'nothing yet' }; } componentDidAppear() { alert( 'componentDidAppear' ); } componentDidDisappear() { alert( 'componentDidDisappear' ); } render() { return ( < View style = {styles.container} > < Text > SignIn < / Text > < / View > ); } } export default SignIn; const styles = StyleSheet.create({ container : { flex : 1 , alignItems: 'center' , justifyContent : 'center' } });
Colored by Color Scripter
from http://kkiuk.tistory.com/156 by ccl(S) rewrite - 2020-03-06 11:54:29
댓글
댓글 쓰기