{"id":23705849,"url":"https://github.com/fidme/react-native-fast-storage","last_synced_at":"2025-09-03T11:31:02.156Z","repository":{"id":47167767,"uuid":"150425640","full_name":"FidMe/react-native-fast-storage","owner":"FidMe","description":"A simple, performance oriented key value storage for React Native. Drop in replacement for AsyncStorage","archived":false,"fork":false,"pushed_at":"2021-10-25T15:22:56.000Z","size":476,"stargazers_count":88,"open_issues_count":3,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-08T03:51:28.901Z","etag":null,"topics":["android","asyncstorage","ios","react-native"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FidMe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-26T12:48:05.000Z","updated_at":"2024-05-01T03:31:29.000Z","dependencies_parsed_at":"2022-09-16T08:00:34.140Z","dependency_job_id":null,"html_url":"https://github.com/FidMe/react-native-fast-storage","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FidMe%2Freact-native-fast-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FidMe%2Freact-native-fast-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FidMe%2Freact-native-fast-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FidMe%2Freact-native-fast-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FidMe","download_url":"https://codeload.github.com/FidMe/react-native-fast-storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231874112,"owners_count":18439220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","asyncstorage","ios","react-native"],"created_at":"2024-12-30T14:58:31.109Z","updated_at":"2024-12-30T14:58:32.023Z","avatar_url":"https://github.com/FidMe.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-fast-storage\n\nreact-native-fast-storage is a drop in replacement for `AsyncStorage`.\n\nThis library is the React Native implementation of https://github.com/Tencent/MMKV.\n\nIt provides very fast read and write access.\n\n## Getting started\n\n`$ npm install react-native-fast-storage --save`\n\n`$ react-native link react-native-fast-storage`\n\n**Additional IOS step**\n\nIf you encounter this error :\n\n```\nld: warning: Could not find auto-linked framework 'MMKV'\n```\n\nYou need to manually follow these steps :\n\n- Open up your project in Xcode\n- Select the main target (under \"Targets\"),\n- Go to the \"Build Settings\" tab, and find the \"Framework Search Paths\" section.\n- Add `../node_modules/react-native-fast-storage/ios` (non-recursive) for each of your configurations (e.g. Debug and Release).\n- Find the MMKV.framework file in ../node_modules/react-native-fast-storage/ios and drag it into Xcode under the \"Frameworks\" section. In the dialog that pops up, uncheck \"Copy items if needed\", choose \"Create groups\", and ensure your main target is checked under \"Add to targets\".\n- In Xcode, select the project, then select the main target (under \"Targets\"), then go to the \"General\" tab and find the \"Embedded Binaries\" section. Click the \"+\" icon and select MMKV.framework which appears under \"Frameworks\" then click \"Add\".\n- In Xcode do \"Product\" -\u003e \"Clean\".\n\n## Usage\n\n```javascript\nimport FastStorage from \"react-native-fast-storage\";\n\nawait FastStorage.setItem(\"key\", \"Coucou toi\");\n\nconst item = await FastStorage.getItem(\"key\");\n```\n\n## Methods\n\nAll methods are asynchronous, just like AsyncStorage.\n\n| Prop        |            Params            |           Returns            | Description                           |\n| :---------- | :--------------------------: | :--------------------------: | :------------------------------------ |\n| setItem     |        `key`, `value`        |           `value`            | Allows to set an item                 |\n| getItem     |            `key`             |           `value`            | Retrieve the item                     |\n| removeItem  |            `key`             |             null             | Remove an item from the store         |\n| clearStore  |             none             |             null             | Clear the entire store                |\n| multiGet    |         Array\u003c`key`\u003e         | Array\u003cArray\u003c`key`, `value`\u003e\u003e | Retrieve multiples item               |\n| multiGet    | Array\u003cArray\u003c`key`, `value`\u003e\u003e |             null             | Set multiples items                   |\n| multiRemove |         Array\u003c`key`\u003e         |             null             | Remove multiples items from the store |\n\n\n## multiGet\n\nGet multiple values at once.\n\n```static multiGet(keys: Array\u003cstring\u003e): Promise\u003cArray\u003cArray\u003cstring, string\u003e\u003e\u003e```\n\n```js\n    const values = await FastStorage.multiGet(['test', 'key'])\n    console.log(values) // [['test', 'testValue'], ['key', 'keyValue']]\n```\n\n## multiSet\n\nSet multiple values at once.\n\n```static multiSet(keys: Array\u003cArray\u003cstring, string\u003e\u003e): Promise\u003cvoid\u003e```\n\n```js\n    await FastStorage.multiSet([['test', 'testValue'], ['key', 'keyValue']])\n```\n\n\n## multiRemove\n\nRemove multiples values at once.\n\n```static multiRemove(keys: Array\u003cstring\u003e): Promise\u003cvoid\u003e```\n\n```js\n    await FastStorage.multiRemove(['test', 'key'])\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffidme%2Freact-native-fast-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffidme%2Freact-native-fast-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffidme%2Freact-native-fast-storage/lists"}