Modernize imports and lifecycles (#304)
This commit is contained in:
parent
c0f33b951d
commit
7542963a52
4
index.js
4
index.js
|
@ -1,5 +1,5 @@
|
||||||
const BlurView = require('./src/BlurView');
|
import BlurView from './src/BlurView';
|
||||||
const VibrancyView = require('./src/VibrancyView');
|
import VibrancyView from './src/VibrancyView';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
BlurView: BlurView,
|
BlurView: BlurView,
|
||||||
|
|
|
@ -14,7 +14,7 @@ const OVERLAY_COLORS = {
|
||||||
};
|
};
|
||||||
|
|
||||||
class BlurView extends Component {
|
class BlurView extends Component {
|
||||||
componentWillMount() {
|
componentDidMount() {
|
||||||
DeviceEventEmitter.addListener('ReactNativeBlurError', message => {
|
DeviceEventEmitter.addListener('ReactNativeBlurError', message => {
|
||||||
throw new Error(`[ReactNativeBlur]: ${message}`);
|
throw new Error(`[ReactNativeBlur]: ${message}`);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue