SDKs
Official NetLoc8 SDKs for JavaScript, React, and Next.js. Each package re-exports its parent — install only the one that matches your framework.
Package Hierarchy
Each SDK builds on the previous one. Install only the most specific package for your framework:
@netloc8/core ← universal JS client
└─ @netloc8/react ← adds Provider, useGeo, GeoGate
└─ @netloc8/nextjs ← adds SSR proxy, getGeo, redirects
Feature Comparison
| Feature | core | react | nextjs |
|---|---|---|---|
| fetchGeo / fetchMyGeo | ✓ | ✓ | ✓ |
| fetchTimezone / fetchMyTimezone | ✓ | ✓ | ✓ |
| isEU() helper | ✓ | ✓ | ✓ |
| Browser signals | ✓ | ✓ | ✓ |
| NetLoc8Provider | — | ✓ | ✓ |
| useGeo() hook | — | ✓ | ✓ |
| GeoGate component | — | ✓ | ✓ |
| getGeo() (server) | — | — | ✓ |
| createProxy() | — | — | ✓ |
| withGeoRedirect() | — | — | ✓ |
Packages
JavaScript / Node.js
@netloc8/coreUniversal IP geolocation client for Node.js, Bun, Deno, Cloudflare Workers, and the browser.
Bash
bun add @netloc8/corefetchGeo / fetchMyGeofetchTimezone / fetchMyTimezoneisEU() helperBrowser signal collectionError-safe (never throws)
React
@netloc8/reactReact context provider, useGeo() hook, and GeoGate component for conditional rendering by location.
Bash
bun add @netloc8/reactNetLoc8ProvideruseGeo() hookGeoGate componentCookie persistenceContent shift prevention
Next.js
@netloc8/nextjsFull Next.js integration with SSR proxy, server components, React hooks, and geo-based redirects.
Bash
bun add @netloc8/nextjsgetGeo() server functioncreateProxy()withGeoRedirect()All React exportsSSR + client support