exponea / exponea-react-native-sdk

MIT License
8 stars 13 forks source link

should "Exponea.configure()" not be marked with await? #104

Closed Adnan-Bacic closed 10 months ago

Adnan-Bacic commented 10 months ago

according to the types it returns Promose<void>, but the documention shows you have to write it as:

Exponea.configure(configuration);

instead of

await Exponea.configure(configuration);

am i correct to believe it should have await in front?

adam1929 commented 10 months ago

No. You can use await only for async methods but Exponea.configure is not. Promise return type is defined by ReactNative for native-plugins, it is a way of RN-native communication. If still questionable, why Promise 'was choose to be' return type by RN: