Migration Demo
The safest migration from @react-native-community/geolocation is two-step:
switch imports to /compat first, verify the app still behaves the same, then
move call sites to the Modern API.
Step 1: Community package
Step 2: Drop-in /compat
First install the Nitro packages:
Then change only the import path:
Keep the callback call site unchanged while you verify the app:
Step 3: Modern API
After the /compat migration is stable, move individual call sites to the
Modern API:
For React component watches, prefer useWatchPosition so subscription cleanup
is owned by the component lifecycle:
Agent-Assisted Migration
This repository also ships an Agent Skills-compatible migration playbook:
The skill first rewrites community imports to /compat, then guides a coding
agent through Modern API refactors with explicit checks for permission timing,
watch cleanup, cached reads, accuracy, and Android provider/settings handling.
