小编Aru*_*r K的帖子

异步存储本机容量

对于Android和IOS,React-native中异步存储的最大存储容量是多少?

react-native asyncstorage

5
推荐指数
1
解决办法
2315
查看次数

react-native componentWillUnmount在导航时不起作用

我正在做这些简单的步骤,但是卸载并没有打电话给我,我不知道为什么。请为此我需要一个解决方案,我需要在浏览到另一个屏幕时调用unmount。

class Homemain extends Component {
    constructor(props) {
        super(props);
    }

    componentWillMount(){
        alert('willMount')
    }
    componentDidMount(){
        alert('didMount')
    }
    componentWillUnmount(){
        alert('unMount')
    }
    Details = () => {
        this.props.navigation.navigate('routedetailsheader')
    }

    render() {
        return(
            <View style={styles.container}>
                <TouchableOpacity onPress={() => this.Details()} style={{ flex: .45, justifyContent: 'center', alignItems: 'center', marginTop: '10%', marginRight: '10%' }}>
                    <Image
                        source={require('./../Asset/Images/child-notification.png')}
                        style={{ flex: 1, height: height / 100 * 20, width: width / 100 * 20, resizeMode: 'contain' }} />
                    <Text
                        style={{ flex: 0.5, justifyContent: 'center', fontSize: width / 100 * 4, …
Run Code Online (Sandbox Code Playgroud)

react-native

4
推荐指数
2
解决办法
6899
查看次数

标签 统计

react-native ×2

asyncstorage ×1