Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
react-hook-google-maps
Advanced tools
Readme
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
The npm package react-hook-google-maps receives a total of 1,127 weekly downloads. As such, react-hook-google-maps popularity was classified as popular.
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
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.