Skip to content

Commit

Permalink
Require react-native instead of reaching into its private modules
Browse files Browse the repository at this point in the history
The new version of the packager doesn't let you reach into the private module namespace of react-native so go through the public interface.
  • Loading branch information
ide committed Jun 26, 2015
1 parent 2dbef3f commit 5e57191
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions KeyboardEvents.ios.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
'use strict';

var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
var RNKeyboardEventsManager = require('NativeModules').RNKeyboardEventsManager;
var {
DeviceEventEmitter,
NativeModules: {
RNKeyboardEventsManager,
},
} = require('react-native');
var EventEmitter = require('eventemitter3');

var KeyboardEventEmitter = new EventEmitter();
Expand Down

1 comment on commit 5e57191

@amasad
Copy link

@amasad amasad commented on 5e57191 Jun 30, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ide!

This is actually a warning now and will be an error in the future. Came up here facebook/react-native#1808

Please sign in to comment.