next-codegrid
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i next-codegrid

Weekly Downloads

6

Version

1.0.2

License

WTFPL

Unpacked Size

10.2 MB

Total Files

163

Last publish

Collaborators

  • zbycz