Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
react-hook-google-maps
Advanced tools
React useGoogleMaps hook
Easiest way to use Google Maps in your React application.
For Google API documentation please check https://developers.google.com/maps/documentation/javascript/reference
npm install --save react-hook-google-maps
import * as React from "react";
import { useGoogleMaps } from "react-hook-google-maps";
const App = () => {
const { ref, map, google } = useGoogleMaps(
// Use your own API key, you can get one from Google (https://console.cloud.google.com/google/maps-apis/overview)
"AIzaSyC4Z5Qz97EWcoCczNn2IcYvaYG0L9pe6Rk",
// NOTE: even if you change options later
{
center: { lat: 0, lng: 0 },
zoom: 3,
},
);
console.log(map); // instance of created Map object (https://developers.google.com/maps/documentation/javascript/reference/map)
console.log(google); // google API object (easily get google.maps.LatLng or google.maps.Marker or any other Google Maps class)
return <div ref={ref} style={{ width: 400, height: 300 }} />;
};
export default App;
Jan Grzegorowski
FAQs
React useGoogleMaps hook
We found that react-hook-google-maps 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.