Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-native-google-places-compat
Advanced tools
An update of react-native-google-places library, brings compatibility with newer React Native version (0.71.x). It addresses dependency and compatibility issues, ensuring seamless integration with Google Places API for React Native projects.
An update of react-native-google-places library, brings compatibility with newer React Native version (0.71.x). It addresses dependency and compatibility issues, ensuring seamless integration with Google Places API for React Native projects.
npm install react-native-google-places-compat
Start by initializing the Google Places client with your Places SDK API key. Refer to the Places SDK documentation for initial setup instructions. It's important to restrict your key usage as detailed here. Replace "your-ios-api-key"
and "your-android-api-key"
with your actual API keys.
RNGooglePlacesCompat.initializePlaceClient(
Platform.OS === 'ios'
? "your-ios-api-key"
: "your-android-api-key"
);
Once initialized, you can use the following methods to interact with the Google Places API:
RNGooglePlacesCompat.openAutocompleteModal()
RNGooglePlacesCompat.getAutocompletePredictions()
RNGooglePlacesCompat.getCurrentPlace()
RNGooglePlacesCompat.lookUpPlaceByID()
If you use getAutocompletePredictions
utilize session tokens to optimize API costs. Start a new session before making autocomplete predictions and end it when you're finished to avoid unnecessary charges. Only fetching place details will incur a cost. Learn more about session tokens here, and for details on usage and billing, read here.
RNGooglePlacesCompat.beginAutocompleteSession();
// RNGooglePlacesCompat.getAutocompletePredictions();
// ... more prediction calls
// Session is terminated if lookUpPlaceByID() is called
// or you can end the session manually by calling
RNGooglePlacesCompat.endAutocompleteSession();
Refer examples in the example directory for more details.
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library
FAQs
An update of react-native-google-places library, brings compatibility with newer React Native version (0.71.x). It addresses dependency and compatibility issues, ensuring seamless integration with Google Places API for React Native projects.
The npm package react-native-google-places-compat receives a total of 6 weekly downloads. As such, react-native-google-places-compat popularity was classified as not popular.
We found that react-native-google-places-compat demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.