PHP 7.4.33
Preview: map-context.ts Size: 479 B
/var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/@react-google-maps/api/src/map-context.ts
import { useContext, createContext } from 'react'
import invariant from 'invariant'

const MapContext = createContext<google.maps.Map | null>(null)

export function useGoogleMap(): google.maps.Map | null {
  invariant(!!useContext, 'useGoogleMap is React hook and requires React version 16.8+')

  const map = useContext<google.maps.Map | null>(MapContext)

  invariant(!!map, 'useGoogleMap needs a GoogleMap available up in the tree')

  return map
}

export default MapContext

Directory Contents

Dirs: 4 × Files: 15
Name Size Perms Modified Actions
- drwxr-xr-x 2026-04-28 09:11:40
Edit Download
docs DIR
- drwxr-xr-x 2026-04-28 09:11:40
Edit Download
utils DIR
- drwxr-xr-x 2026-04-28 09:11:40
Edit Download
__tests__ DIR
- drwxr-xr-x 2026-04-28 09:11:40
Edit Download
939 B lrw-r--r-- 2026-04-28 09:11:40
Edit Download
829 B lrw-r--r-- 2026-04-28 09:11:40
Edit Download
16.12 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
3.56 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
6.24 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
198 B lrw-r--r-- 2026-04-28 09:11:40
Edit Download
1.29 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
479 B lrw-r--r-- 2026-04-28 09:11:40
Edit Download
8.56 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
270 B lrw-r--r-- 2026-04-28 09:11:40
Edit Download
275 B lrw-r--r-- 2026-04-28 09:11:40
Edit Download
1.37 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
2.71 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
1.39 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
3.50 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).