An open API service indexing awesome lists of open source software.

https://github.com/alpheusday/unstorage-react-native-mmkv

A React Native MMKV driver for unstorage
https://github.com/alpheusday/unstorage-react-native-mmkv

javascript mmkv react react-native react-native-mmkv typescript unstorage

Last synced: 7 days ago
JSON representation

A React Native MMKV driver for unstorage

Awesome Lists containing this project

README

          

# unstorage React Native MMKV

A React Native MMKV driver for unstorage.

## Installation

> Both `unstorage` and `react-native-mmkv` are required to be installed.

Install this package as a dependency in the project:

```sh
# npm
npm i unstorage-react-native-mmkv

# Yarn
yarn add unstorage-react-native-mmkv

# pnpm
pnpm add unstorage-react-native-mmkv

# Deno
deno add npm:unstorage-react-native-mmkv

# Bun
bun add unstorage-react-native-mmkv
```

## Usage

```ts
import { createStorage } from "unstorage";
import { mmkvDriver } from "unstorage-react-native-mmkv";

const storage = createStorage({
driver: mmkvDriver(),
});
```

### Options

`mmkvDriver` accepts React Native MMKV [Configuration](https://github.com/mrousavy/react-native-mmkv/blob/main/packages/react-native-mmkv/src/specs/MMKV.nitro.ts) as options.

### Storage APIs

For the storage APIs, please refer to the [unstorage guide](https://unstorage.unjs.io/guide).

## Contributing

For contributing, please refer to the [contributing guide](./CONTRIBUTING.md).

## License

This project is licensed under the terms of the MIT license.