if (connection == null) {
      console.warn("This browser doesn't support the Network Information API");
      return { remove: () => {} };
    }
Adds an event handler.

See https://facebook.github.io/react-native/docs/netinfo.html#addeventlistener