Skip to content
1.3.0 documentation · List APIs, scoped deletion, and normalized errors are available from 1.3.0. View release history ↗

Migrate an existing app ​

Nitro Cookies follows the familiar asynchronous cookie API from @react-native-cookies/cookies. Replace the import, then verify your app's store and platform assumptions.

Replace the native dependency ​

Install both packages from the installation guide, remove the previous native cookie package, and rebuild the app.

diff
- import CookieManager from '@react-native-cookies/cookies';
+ import CookieManager from 'react-native-nitro-cookies';

Keeping the local name can reduce changes at call sites. It does not prove every old behavior matches.

Review your assumptions ​

Existing assumptionWhat to verify
One cookie per nameUse list APIs if duplicate names matter.
A read result contains the original scopeAndroid URL results cannot recover it. Retain the write scope.
Native and WebView cookies share a storeSelect the iOS WebKit store explicitly where needed.
All Android devices have cookie storageHandle devices without a working WebView provider.
Name-only removal targets a precise cookieUse scoped deletion for overlapping identities.
Every platform supports every methodCheck getAll, WebKit, persistence, and session behavior.

Adopt synchronous methods deliberately ​

Sync methods do not return Promises and cannot access the iOS WebKit store. Keep asynchronous calls where you need WebKit access or platform acknowledgment. Do not replace all async calls solely because sync methods exist.

Verify authentication, logout, WebView navigation, and persistence on your target platforms. Use the error reference for the normalized error contract.

MIT licensed · React Native Nitro Cookies