![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
react-native-google-places
Advanced tools
iOS/Android Google Places Widgets (Autocomplete, Place Picker) for React Native Apps
iOS/Android Google Places Widgets (Autocomplete, Place Picker) for React Native Apps
npm i react-native-google-places --save
react-native link react-native-google-places
Copy items if needed and Create groups
are checked. Go to node_modules ➜ react-native-google-places ➜ add ios
folder (this step may not be required if running react-native link
already worked for you).pod 'GooglePlaces'
and pod 'GoogleMaps'
to your Podfile.cd ios && pod init
at the root directory of your project. Otherwise just edit your Podfile to include:source 'https://github.com/CocoaPods/Specs.git'
target 'YOUR_APP_TARGET_NAME' do
pod 'GooglePlaces'
pod 'GoogleMaps'
end
@import GooglePlaces;
on top of the file.didFinishLaunchingWithOptions
method, instantiate the library as follows:[GMSPlacesClient provideAPIKey:@"YOUR_IOS_API_KEY_HERE"];
pod install
from your ios
directory..xcworkspace
file to open the project. Or just use the react-native run-ios
command as usual to run your app in the simulator.<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_ANDROID_API_KEY_HERE"/>
react-native link react-native-google-places
. Otherwise, do the following or just ensure they are in place;android/settings.gradle
file:include ':react-native-google-places'
project(':react-native-google-places').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-google-places/android')
android/app/build.grade
file:dependencies {
...
compile project(':react-native-google-places')
}
...MainApplication.java
file:import com.arttitude360.reactnative.rngoogleplaces.RNGooglePlacesPackage;
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
...
new RNGooglePlacesPackage() //<-- Add line
);
}
react-native run-android
to get started.import RNGooglePlaces from 'react-native-google-places';
class GPlacesDemo extends Component {
openSearchModal() {
RNGooglePlaces.openAutocompleteModal()
.then((place) => {
console.log(place);
// place represents user's selection from the
// suggestions and it is a simplified Google Place object.
})
.catch((error) => console.log(error));
}
render() {
return (
<View style={styles.container}>
<TouchableOpacity
style={styles.button}
onPress={() => this.openSearchModal()}
>
<Text>Pick a Place</Text>
</TouchableOpacity>
</View>
);
}
}
{
placeID: "ChIJZa6ezJa8j4AR1p1nTSaRtuQ",
website: "https://www.facebook.com/",
phoneNumber: "+1 650-543-4800",
address: "1 Hacker Way, Menlo Park, CA 94025, USA",
name: "Facebook HQ",
latitude: 37.4843428,
longitude: -122.14839939999999
}
Promise
from calling RNGooglePlaces.openAutocompleteModal()
are dependent on the selected place - as phoneNumber, website
are not set on all Google Place
objects.You have to link dependencies and re-run the build :
react-native link
Copy items if needed and Create groups
are checked. Go to node_modules ➜ react-native-google-places ➜ add ios
folder (this step may not be required if running react-native link
already worked for you).react-native run-ios
The MIT License.
FAQs
iOS/Android Google Places Widgets (Autocomplete Modals) and API Services for React Native Apps
The npm package react-native-google-places receives a total of 1,016 weekly downloads. As such, react-native-google-places popularity was classified as popular.
We found that react-native-google-places demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.