yarn react-native-mmkv 2.5.0
Release 2.5.0

latest releases: 3.1.0, 3.0.2, 3.0.1...
2 years ago

2.5.0 (2022-10-20)

✨ Features

  • Support setting and getting ArrayBuffers (Uint8Array) (#460) (1f2bcd1), closes #463

Example:

const storage = new MMKV()

// Set to storage
const buffer = new Uint8Array([255, 100, 8, 5])
storage.set('someToken', buffer)

// Get from storage
const buffer = storage.getBuffer('someToken')
console.log(buffer) // [255, 100, 8, 5]

// Fun Fact:
// You can read every value as a Buffer:
storage.set('someString', 'Hey!');
const buffer = storage.getBuffer('someString')
console.log(buffer); // [72, 101, 121, 33]

Don't miss a new react-native-mmkv release

NewReleases is sending notifications on new releases.