Closed naporin0624 closed 4 months ago
@naporin0624 Thank you for contributing our SDK! We have confirmed your PR and discussed about it. In conclusion, it will not be merged as we have found better approach to handle this issue. Please refer to following.
expo prebuild --clean
@SojiroNishimura
Understood! I'm using Expo Go and thought that having it work with native modules would enhance the developer experience. However, I see now how behavior that works on Expo Go could lead to confusion with other standard Expo native modules. I understand why the merge can't happen. Thank you for discussing this.
Thank you for crafting the karte SDK for react-native.
Overview
Details
It was observed that when using Expo Go,
NativeModules.RNKRTXXXModule
becomes undefined. To accommodate for this, I've introducedundefined
as a union type and employed optional chaining to ensure that API calls are made safely and correctly within the Expo Go environment.Additional Notes
yarn tsc --noEmit
runs without issues.yarn test
executes successfully.yarn build
operates correctly.yarn build && npm pack
and validated its functionality within my project.