let listener;
    if (eventName === 'connectionChange') {
      listener = NetInfoEventEmitter.addListener(
        DEVICE_CONNECTIVITY_EVENT,
        (appStateData) => {
          handler({
            type: appStateData.connectionType,
            effectiveType: appStateData.effectiveConnectionType
          });
        }
      );
    }
Adds an event handler. Supported events:

- `connectionChange`: Fires when the network status changes. The argument to the event
  handler is an object with keys:
  - `type`: A `ConnectionType` (listed above)
  - `effectiveType`: An `EffectiveConnectionType` (listed above)
- `change`: This event is deprecated. Listen to `connectionChange` instead. Fires when
  the network status changes. The argument to the event handler is one of the deprecated
  connectivity types listed above.