{"_id":"expo-zustand-persist","_rev":"4-3b3a05437c71ff773f57b57d8c36d737","name":"expo-zustand-persist","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.2":{"name":"expo-zustand-persist","version":"1.0.2","keywords":["zustand","persist","expo","react-native","state-management"],"author":{"name":"Pedro Augusto Freitas de Souza"},"license":"MIT","_id":"expo-zustand-persist@1.0.2","maintainers":[{"name":"pedroafsouza","email":"pedroafsouza@gmail.com"}],"homepage":"https://github.com/pedroafsouza/expo-zustand-persist#readme","bugs":{"url":"https://github.com/pedroafsouza/expo-zustand-persist/issues"},"dist":{"shasum":"74185ff5a46a015adeacd5ecc63e7c9418fbbc85","tarball":"https://registry.npmjs.org/expo-zustand-persist/-/expo-zustand-persist-1.0.2.tgz","fileCount":4,"integrity":"sha512-3aNFrd8dstgaIQQ5MvN0T+n2xioWx7pjYtH8jJAEFsN5d+1lTpu8TaBgKZ7tZqdv+hYv6I4HzByFVZGgUCYoPg==","signatures":[{"sig":"MEUCIQDIpcjava7OjSRmpZYdOFDxgweyZTzdvhpMNMI+8YcIKgIgfnVg0yRr2OU4sqyHySzqCx/4u8+5eqa/gh5cfu4plro=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11115},"main":"index.js","gitHead":"97ff37fa2b52994f27fb12277c4f9894e1b5c370","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"pedroafsouza","email":"pedroafsouza@gmail.com"},"repository":{"url":"git+https://github.com/pedroafsouza/expo-zustand-persist.git","type":"git"},"_npmVersion":"10.8.2","description":"A package that makes Zustand persist work with React Native/Expo.","directories":{},"_nodeVersion":"20.17.0","dependencies":{"zustand":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.0","typescript":"^5.6.3","@types/node":"^22.8.1"},"_npmOperationalInternal":{"tmp":"tmp/expo-zustand-persist_1.0.2_1729962210437_0.6143775148802695","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"expo-zustand-persist","version":"1.0.3","keywords":["zustand","persist","expo","react-native","state-management"],"author":{"name":"Pedro Augusto Freitas de Souza"},"license":"MIT","_id":"expo-zustand-persist@1.0.3","maintainers":[{"name":"pedroafsouza","email":"pedroafsouza@gmail.com"}],"homepage":"https://github.com/pedroafsouza/expo-zustand-persist#readme","bugs":{"url":"https://github.com/pedroafsouza/expo-zustand-persist/issues"},"dist":{"shasum":"7cd0fdcdeec82c3049301d1d675c22e1ba6fbe6d","tarball":"https://registry.npmjs.org/expo-zustand-persist/-/expo-zustand-persist-1.0.3.tgz","fileCount":4,"integrity":"sha512-nxT3xljLQj8nZryJ+KaM2fv31BveGPKIRX96kMPEqlHja0hX8QKOuY0EKW/YjNeRJf3CnmZ+hgBmIoB6hxi57Q==","signatures":[{"sig":"MEUCIQDcqpTAEV6lSy0uitbgGdWsaRO+c4EeDdQHBxJd2BUgsAIgJRX/N+NKa+F92vlMxNONKNG5lr/py/aZePvxvLFF0lw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11115},"main":"index.js","gitHead":"c7f1265e929d6b8ce64fd47d9b12fce0df2d4413","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"pedroafsouza","email":"pedroafsouza@gmail.com"},"repository":{"url":"git+https://github.com/pedroafsouza/expo-zustand-persist.git","type":"git"},"_npmVersion":"10.8.2","description":"A package that makes Zustand persist work with React Native/Expo.","directories":{},"_nodeVersion":"20.17.0","dependencies":{"zustand":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.0","typescript":"^5.6.3","@types/node":"^22.8.1"},"_npmOperationalInternal":{"tmp":"tmp/expo-zustand-persist_1.0.3_1730038081241_0.35710365661851995","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"expo-zustand-persist","version":"1.0.4","keywords":["zustand","persist","expo","react-native","state-management"],"author":{"name":"Pedro Augusto Freitas de Souza"},"license":"MIT","_id":"expo-zustand-persist@1.0.4","maintainers":[{"name":"pedroafsouza","email":"pedroafsouza@gmail.com"}],"homepage":"https://github.com/pedroafsouza/expo-zustand-persist#readme","bugs":{"url":"https://github.com/pedroafsouza/expo-zustand-persist/issues"},"dist":{"shasum":"19e61d78bd802a93c1f74e5ce54cfa95a3ad61fd","tarball":"https://registry.npmjs.org/expo-zustand-persist/-/expo-zustand-persist-1.0.4.tgz","fileCount":9,"integrity":"sha512-pCDTD4r4+EG/LtvfL+1XMQGy37GVrj7QB3hddXFe4Ow2BjeDQdwiqKX5CVCLeteAc05fpb+pZBcoJAfTb3qhBw==","signatures":[{"sig":"MEUCIQDIue+GtdjTSemOAX3APzPw6Y5zPxeDssTHjWYGXuYVtgIgPapAE6Z+9CADkvpqB6ffAzwqSbhk8/4GrIKzpM6aiM4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19655},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"c7f1265e929d6b8ce64fd47d9b12fce0df2d4413","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc"},"_npmUser":{"name":"pedroafsouza","email":"pedroafsouza@gmail.com"},"repository":{"url":"git+https://github.com/pedroafsouza/expo-zustand-persist.git","type":"git"},"_npmVersion":"10.8.2","description":"A package that makes Zustand persist work with React Native/Expo.","directories":{},"_nodeVersion":"20.17.0","dependencies":{"zustand":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.0","typescript":"^5.6.3","@types/node":"^22.8.1"},"_npmOperationalInternal":{"tmp":"tmp/expo-zustand-persist_1.0.4_1730039747360_0.07411089609309562","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"expo-zustand-persist","version":"1.0.5","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc"},"main":"dist/index.js","types":"dist/index.d.ts","keywords":["zustand","persist","expo","react-native","state-management"],"author":{"name":"Pedro Augusto Freitas de Souza"},"license":"MIT","description":"A package that makes Zustand persist work with React Native/Expo.","repository":{"type":"git","url":"git+https://github.com/pedroafsouza/expo-zustand-persist.git"},"bugs":{"url":"https://github.com/pedroafsouza/expo-zustand-persist/issues"},"homepage":"https://github.com/pedroafsouza/expo-zustand-persist#readme","dependencies":{"zustand":"^5.0.0"},"devDependencies":{"@types/node":"^22.8.1","tslib":"^2.8.0","typescript":"^5.6.3"},"_id":"expo-zustand-persist@1.0.5","gitHead":"daeb11959a860cdd9027f4c9cd2e89bb807a8047","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-LHySn6TqFU+SR+3BW7eN+ZEEOW5y+QpHa6FMFBQuiE9TibnA3resyYEoKJ3Yd4qOV2QuggeK8pYV6V/ejFQUYg==","shasum":"a6916df464e92094c849e9878d76782dbbaae925","tarball":"https://registry.npmjs.org/expo-zustand-persist/-/expo-zustand-persist-1.0.5.tgz","fileCount":11,"unpackedSize":21789,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICFmrHu7OJdphtBd8Wzrmoz8YgiAERgCvnPnm5onr8xSAiEA/ikqzAiMe2jHBRhHgF9FjaJ7b502T5+mOpN53p76KHk="}]},"_npmUser":{"name":"pedroafsouza","email":"pedroafsouza@gmail.com"},"directories":{},"maintainers":[{"name":"pedroafsouza","email":"pedroafsouza@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/expo-zustand-persist_1.0.5_1773510706517_0.29919022078259694"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-26T17:03:30.436Z","modified":"2026-03-14T17:51:46.778Z","1.0.2":"2024-10-26T17:03:30.632Z","1.0.3":"2024-10-27T14:08:01.411Z","1.0.4":"2024-10-27T14:35:47.575Z","1.0.5":"2026-03-14T17:51:46.658Z"},"bugs":{"url":"https://github.com/pedroafsouza/expo-zustand-persist/issues"},"author":{"name":"Pedro Augusto Freitas de Souza"},"license":"MIT","homepage":"https://github.com/pedroafsouza/expo-zustand-persist#readme","keywords":["zustand","persist","expo","react-native","state-management"],"repository":{"type":"git","url":"git+https://github.com/pedroafsouza/expo-zustand-persist.git"},"description":"A package that makes Zustand persist work with React Native/Expo.","maintainers":[{"name":"pedroafsouza","email":"pedroafsouza@gmail.com"}],"readme":"\n\n# expo-zustand-persist \nA lightweight middleware to enable persistence for [zustand](https://github.com/pmndrs/zustand)  state management in React Native and Expo applications. This package is inspired by [zustand/middleware](https://github.com/pmndrs/zustand)  and makes it easy to persist your app's state in local storage or similar storage mechanisms compatible with React Native and Expo.\n## Features \n\n- Compatible with React Native and Expo\n\n- Easy to set up and use with Zustand's store\n\n- Allows seamless state persistence across app sessions\n\n## Installation \n\nInstall the package with npm:\n\n```bash\nnpm install expo-zustand-persist zustand\n```\n \n\n## Getting Started \nTo enable persistence with `expo-zustand-persist`, simply wrap your Zustand store with the middleware.\n### Example Usage \nHere’s a basic setup of how to use `expo-zustand-persist` to persist your store:\n\n```typescript\nimport { create } from 'zustand';\nimport { createJSONStorage, persist } from 'expo-zustand-persist';\nimport AsyncStorage from '@react-native-async-storage/async-storage';\n\ntype Store = {\n  counter: number;\n  increase: () => void;\n  reset: () => void;\n};\n\n// Define your store as usual\nconst useStore = create<Store>(\n  persist(\n    (set) => ({\n      counter: 0,\n      increase: () => set((state) => ({ counter: state.counter + 1 })),\n      reset: () => set({ counter: 0 }),\n    }),\n    {\n      name: 'my-app-storage', // unique name for storage key\n      storage: createJSONStorage(() => AsyncStorage), // Using WmaStorage as the storage engine\n    }\n  )\n);\n```\n","readmeFilename":"readme.md"}