1.0.2 • Published 1 month ago

next-codegrid v1.0.2

Weekly downloads
-
License
WTFPL
Repository
github
Last release
1 month ago

next-codegrid - query country code

Modification of the codegrid-js library for use in Next.js.

  • bundles all tiles as javascript chunks – both for client and server
  • this process adds 10 secs to the next build (TODO: optimize - store in /public ?)
    • output size is 10.5 MB (see .next/static/chunks)
  • first resolve takes ~40ms (both client and server), subsequent resolves are instant if it falls to the same tile

    • fetches 35kb for worldgrid, then 100-300kb for tile (or 13kb gzipped, then ~50kB for tile)
  • sadly the generator is lost, so no more updates to the tiles: http://github.com/hlaw/codegrid

Usage

yarn add next-codegrid
import { resolveCountryCode } from 'react-codegrid';

const code = await resolveCountryCode([lon, lat]);

License

Github page

Author

  • hlaw
  • QuinsZouls
1.0.2

1 month ago

1.0.1

1 month ago

1.0.0

1 month ago