{"id":17990310,"url":"https://github.com/charliehess/redux-persist-sqlite","last_synced_at":"2025-03-25T23:31:18.908Z","repository":{"id":57351198,"uuid":"173661714","full_name":"CharlieHess/redux-persist-sqlite","owner":"CharlieHess","description":"A redux-persist storage adapter that writes to sqlite","archived":false,"fork":false,"pushed_at":"2019-03-11T02:06:59.000Z","size":28,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T06:14:27.576Z","etag":null,"topics":["redux","redux-persist","sqlite"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/CharlieHess.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":"2019-03-04T02:44:38.000Z","updated_at":"2025-02-15T16:45:34.000Z","dependencies_parsed_at":"2022-09-18T23:41:20.017Z","dependency_job_id":null,"html_url":"https://github.com/CharlieHess/redux-persist-sqlite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlieHess%2Fredux-persist-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlieHess%2Fredux-persist-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlieHess%2Fredux-persist-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlieHess%2Fredux-persist-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CharlieHess","download_url":"https://codeload.github.com/CharlieHess/redux-persist-sqlite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245561508,"owners_count":20635755,"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":["redux","redux-persist","sqlite"],"created_at":"2024-10-29T19:17:29.141Z","updated_at":"2025-03-25T23:31:13.877Z","avatar_url":"https://github.com/CharlieHess.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redux-persist-sqlite\n\nA redux-persist storage adapter that writes to [sqlite](https://github.com/mapbox/node-sqlite3).\n\nThis is adapted from https://github.com/prsn/redux-persist-sqlite-storage, but uses Node.js sqlite3 rather than react-native.\n\nGreat for Electron apps that are backed by Redux.\n\n## install\n\n```\nnpm i redux-persist-sqlite\n```\n\n## usage\n\n``` typescript\n// configureStore.ts\nimport { createStore } from 'redux';\nimport { persistStore, persistReducer } from 'redux-persist';\nimport { SQLiteAdapter }  from 'redux-persist-sqlite';\n\nconst yourDbName = 'redux-persist.db';\nconst pathToYourDB = path.join(process.cwd(), yourDbName);\n\nconst rootPersistConfig = {\n  key: 'root',\n  storage: new SQLiteAdapter(pathToYourDB)\n};\n\nconst persistedReducer = persistReducer(persistConfig, rootReducer);\n\nexport function configureStore() {\n  const store = createStore(persistedReducer);\n  const persistor = persistStore(store);\n  return { store, persistor };\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharliehess%2Fredux-persist-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharliehess%2Fredux-persist-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharliehess%2Fredux-persist-sqlite/lists"}