美文网首页
Cannot read property 'setNativeP

Cannot read property 'setNativeP

作者: 你要怎么 | 来源:发表于2018-03-28 10:55 被阅读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();

    };

参考链接

相关文章

网友评论

      本文标题:Cannot read property 'setNativeP

      本文链接:https://www.haomeiwen.com/subject/brrycftx.html