{"_id":"@athrok/react-storage","name":"@athrok/react-storage","dist-tags":{"latest":"0.0.1-alpha"},"versions":{"0.0.1-alpha":{"name":"@athrok/react-storage","version":"0.0.1-alpha","description":"A React LocalStorage & SessionStorage persistence wrapper for Athrok state management library.","main":"index.js","module":"index.mjs","types":"index.d.ts","homepage":"https://github.com/alok-shete/athrok-persist/react-storage#readme","publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/alok-shete/athrok-persist/issues"},"repository":{"type":"git","url":"git+https://github.com/alok-shete/athrok-persist.git"},"keywords":["react","localstorage","sessionstorage","persistence","wrapper","state-management","Athrok"],"author":{"name":"Alok Shete"},"license":"MIT","peerDependencies":{"react":"*","athrok":"*"},"contributors":[{"name":"Alok Shete","email":"shetealok@gmail.com"}],"_id":"@athrok/react-storage@0.0.1-alpha","gitHead":"78a55e5a432576868e9cc1a98d50906eafaba6a9","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-8S/Zd285r20xSNjuGIQVLqxFX+Wb7RhLQ8vzi3bpA7dSPVw8AmSnljRb3UMXfdK1s0EfN3jMcWYv1SD/V1GgkQ==","shasum":"5ec55f0a932b5b93649f099da084a787cd084c56","tarball":"https://registry.npmjs.org/@athrok/react-storage/-/react-storage-0.0.1-alpha.tgz","fileCount":7,"unpackedSize":10924,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCb0/iHhCEuZntD107RmhGKRuSWle2qM/oRQFmwKkdCOQIhAMzbBha1TmzUWeM1EyF4ESvQ6HAW0W5Dvb5UIcczSn4m"}]},"_npmUser":{"name":"shetealok","email":"shetealok@gmail.com"},"directories":{},"maintainers":[{"name":"shetealok","email":"shetealok@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-storage_0.0.1-alpha_1715513240954_0.012124125264491914"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-12T11:27:20.876Z","0.0.1-alpha":"2024-05-12T11:27:21.121Z","modified":"2024-05-12T11:27:21.389Z"},"maintainers":[{"name":"shetealok","email":"shetealok@gmail.com"}],"description":"A React LocalStorage & SessionStorage persistence wrapper for Athrok state management library.","homepage":"https://github.com/alok-shete/athrok-persist/react-storage#readme","keywords":["react","localstorage","sessionstorage","persistence","wrapper","state-management","Athrok"],"repository":{"type":"git","url":"git+https://github.com/alok-shete/athrok-persist.git"},"contributors":[{"name":"Alok Shete","email":"shetealok@gmail.com"}],"author":{"name":"Alok Shete"},"bugs":{"url":"https://github.com/alok-shete/athrok-persist/issues"},"license":"MIT","readme":"# @athrok/react-storage\n\nReact Storage Persistence Providers for Athrok State Management Library\n\n## Introduction\n\n`@athrok/react-storage` is a utility package that provides persistence providers for managing storage in React applications using Athrok state management library. This package offers a convenient way to persist application state using local storage and session storage.\n\n## Features\n\n- Provides persistence providers for local storage and session storage.\n- Integrates seamlessly with Athrok's StorageManager for managing application state persistence.\n- Offers a simple and straightforward API for initializing storage providers.\n\n## Installation\n\nYou can install `@athrok/react-storage` via npm or yarn:\n\n```bash\nnpm install @athrok/react-storage\n```\n\nor\n\n```bash\nyarn add @athrok/react-storage\n```\n\n## Usage\n\nTo use `@athrok/react-storage`, follow these steps:\n\n1. Import the necessary modules:\n\n```javascript\nimport React from \"react\";\nimport { PersistenceProvider } from \"@athrok/react-storage\";\n```\n\n2. Wrap your application's components with the desired persistence provider:\n\nFor local storage:\n\n```javascript\nexport default function App() {\n  return (\n    <PersistenceProvider.LocalStorage>\n      {\n        // Place your application's child components and data here\n      }\n    </PersistenceProvider.LocalStorage>\n  );\n}\n```\n\nFor session storage:\n\n```javascript\nexport default function App() {\n  return (\n    <PersistenceProvider.SessionStorage>\n      {\n        // Place your application's child components and data here\n      }\n    </PersistenceProvider.SessionStorage>\n  );\n}\n```\n\nIn these examples, the `PersistenceProvider` components ensure that Athrok's storage persistence is initialized and ready for use throughout the application. You can place your application's child components and data inside the appropriate `PersistenceProvider` component to manage the persistence of the application state using either local storage or session storage.\n\n## Contributing\n\nContributions to `@athrok/react-storage` are welcome! Feel free to submit bug reports, feature requests, or pull requests on [GitHub](https://github.com/alok-shete/athrok-persist).\n\n## License\n\nThis project is licensed under the [MIT License](https://github.com/alok-shete/athrok-persist/blob/main/LICENSE).\n","readmeFilename":"README.md"}