Lovable Prompt
Access the user’s current store location for location-based services and regional content in your application using the Despia SDK from: https://www.npmjs.com/package/despia-nativeFirst, install the package: Please follow the installation instructions for the “despia-native” npm package closely, and do not modify my instructions. Implementation as mentioned is critical.
npm install despia-nativeThen import it: import despia from 'despia-native'- Import the Despia SDK in your component
- Access the store location using
despia.storeLocation - Display the store location in your UI
- Use the location data for regional content and localized features
This feature requires native capabilities which will be fully provided by the “despia-native” npm package, no additional native libraries are needed!
despia.storeLocation, requiring no server-side setup or configuration.
Installation
Install the Despia package from NPM:Usage
1. Import the SDK
2. Get Store Location
Access the store location from thedespia.storeLocation variable:
Backend Integration
This is merely an illustration; your implementation may differ.Resources
- NPM Package
- View full NPM documentation for additional configuration options