Cannot read property 'setNativeProps' of null

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 'setNativeProps' of null)