I have created an npm module (Typescript/RN) used for event tracking. One of its features that can be turned on at initialization is to automatically track geolocation data with every event. The module uses the react-native-community/geolocation library to obtain this data, making it a peer dependency. So even if I choose not to track geo data by turning it off at initialization, the geo library is still required as a peer dependency.
Ideally I would want a setup where the library only gets installed whenever we initialize the app to use it. Or maybe we can provide the methods used for obtaining the geolocation as params for the initialization as some sort of plugin. WDYT the best solution would be to this?