diff --git a/index.js b/index.js index bc1fbd8..667bb12 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ -const BlurView = require('./src/BlurView'); -const VibrancyView = require('./src/VibrancyView'); +import BlurView from './src/BlurView'; +import VibrancyView from './src/VibrancyView'; module.exports = { BlurView: BlurView, diff --git a/src/BlurView.android.js b/src/BlurView.android.js index 913eadc..6ae513b 100644 --- a/src/BlurView.android.js +++ b/src/BlurView.android.js @@ -14,7 +14,7 @@ const OVERLAY_COLORS = { }; class BlurView extends Component { - componentWillMount() { + componentDidMount() { DeviceEventEmitter.addListener('ReactNativeBlurError', message => { throw new Error(`[ReactNativeBlur]: ${message}`); });