Cannot read property 'setNativeP

2018-03-28  本文已影响0人  你要怎么

react-native-root-toast

Update ToastContainer.js - related Cannot read property 'setNativeProps' of null

在ToastContainer.js里把componentWillUnmount里的 this._hide()改成this._root && this._hide();

componentWillUnmount = () => {

        Dimensions.removeEventListener('change', this._windowChanged);

        Keyboard.removeListener('keyboardDidChangeFrame', this._keyboardDidChangeFrame);

        this._root && this._hide();

    };

参考链接

上一篇下一篇

猜你喜欢

热点阅读