title: react-native-udp Sochets.createSocket undefined object
body: <p>I wanted to included UDP function in my react native app. To do so I used this library:</p>
  
  <pre><code>https://github.com/tradle/react-native-udp
  </code></pre>
  
  <p>Usage:</p>
  
  <pre><code> componentDidMount() {
      const socket = dgram.createSocket('udp4');
  
      socket.bind(12345, '0.0.0.0', function(){
          console.log('bound');
      });
  
    }
  </code></pre>
  
  <p>I followed the instructions to install and link it. But I receive this error anyways:</p>
  
  <pre><code>[09:44:01] TypeError: undefined is not an object (evaluating 'Sockets.createSocket')
  
  This error is located at:
      in HomeScreen (at App.js:23)
      in RCTView (at View.js:44)
      in App (at registerRootComponent.js:17)
      in RootErrorBoundary (at registerRootComponent.js:16)
      in ExpoRootComponent (at renderApplication.js:34)
      in RCTView (at View.js:44)
      in RCTView (at View.js:44)
      in AppContainer (at renderApplication.js:33)
  - node_modules\react-native-udp\UdpSocket.js:61:10 in UdpSocket
  - node_modules\react-native-udp\UdpSockets.js:11:23 in createSocket
  * screens\HomeScreen.js:24:38 in componentDidMount
  - node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:12144:10 in commitLifeCycles
  - node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:13496:8 in commitAllLifeCycles
  - node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:92:15 in invokeGuardedCallbackImpl
  - node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:306:36 in invokeGuardedCallback
  - node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:13702:8 in commitRoot
  - node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:15269:13 in completeRoot
  - node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:15197:21 in performWorkOnRoot
  - node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:15090:24 in performWork
  - node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:15047:14 in performSyncWork
  - node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14925:19 in requestWork
  - node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14711:16 in scheduleWork
  - node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:7700:17 in enqueueSetState
  - node_modules\react\cjs\react.development.js:364:31 in setState
  * App.js:53:18 in _handleFinishLoading
  </code></pre>
  
  <p>The versions I am using are:</p>
  
  <pre><code>"@expo/samples": "2.1.1",
      "expo": "^31.0.2",
      "react": "16.5.0",
      "react-native": "https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz",
      "react-native-udp": "^2.3.1",
      "react-navigation": "^2.18.2"
  </code></pre>
  
  <p>Can someone please confirm or deny the library working properly?</p>