Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
The @amazon-devices/react-native-cookies library provides a way for React Native applications to manage cookies. A cookie is a small piece of data stored on the user’s device by the web browser, when a user browses a website. Cookies are designed to be a reliable mechanism for websites to remember stateful information or to record the user’s browsing activity.

Installation

  1. Add the JavaScript library dependency in the package.json file:
  2. Reinstall dependencies using the npm install command.

Examples

The following example shows the methods already implemented in this library.

API reference

Check out the official README from the @react-native-cookies/cookies GitHub repository. The list below shows the current state of implemented functionalities.

Known issues and limitations

  • When no domain field is specified for the Cookie object, a URL host is used instead.
  • When no path is specified for the Cookie object, an empty path / is assumed.
  • Setting useWebKit = true on the Vega platform, for methods that accept the parameter, is a no-op. If no value is provided, useWebKit defaults to false.
  • Passing a malformed URL, to any methods that accept a URL, returns an error message.
  • The accepted date-time format for the expires field of a Cookie object is the ISO8601 format with an offset from UTC. After a cookie is set on Vega, the date-time is always converted to GMT. For example, after mockedCookie from the previous example is set, subsequent retrievals return a timestamp of expires: '2030-06-01T17:30:00.00Z'. This timestamp is the equivalent time in GMT.
  • When session cookies (cookies with no expires field) are retrieved with get, the expires field is populated with 1970-01-01T00:00:00Z. If this cookie is used with other Cookie Managers, remove the field from the cookie. Otherwise, the cookie is read as expired by other Cookie Manager implementations (such as Webview Cookie Manager).

Supported versions

Supported Third-Party Libraries and Services.
Last modified on October 2, 2025