-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native Expo Support #7 #25
Conversation
uniqueIdPromiseTimeout: 5000 | ||
}); | ||
|
||
export class ReactNativeBasePlugin extends BaseTelemetryPlugin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was originally thinking that we would have a base class and then 2 implementation classes (the existing and one that didn't set the device info) -- but this works.
The only issue I can think of is that "generally" you would not expect to create and use "Base" classes instances in an application....
We can probably "fix" this by just changing the name of this class to something that doesn't contain Base (or doesn't read like it's a support class that should not be directly used).
Some possible options that come to mind (as we can't change the original without causing bigger breaking changes)
- ReactNativeDefaultPlugin
- ReactNativeNoDevicePlugin
- ReactNativePluginNoDeviceInfo
- ReactNativeManualDevicePlugin
etc, I'm open to other suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like ReactNativeManualDevicePlugin~
|
||
protected getDeviceInfoModule(_deviceInfoModule): IDeviceInfoModule { | ||
if (!_deviceInfoModule) { | ||
console.log("ReactNativePlugin: Please provide device-info"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We generally don't emit directly to the console, so we should use something like the following
_warnToConsole(_self.diagLog(), "Failed to get DeviceInfo: " + getExceptionName(e) + " - " + dumpObj(e));
And because this will be automatically called as part of the collecting the device, it should also mention that they can disable this by the disableDeviceCollection
No description provided.