dOrgTech / dOrgTech/DAOcreator
`initStateStore` - Don't Assume LocalStorage
- Dominant language
- TypeScript
- Stars
- 34
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Currently we've hard-coded our state persistence into the UI layer and are using the localStorage of the browser. We should instead be making API calls into the Lib layer, and using an interface the implementer of the library supplies upon initialization.
For example:
```typescript
import { initStateStore } from "lib/state";
// localStorage in browser, file in CLI
setStateStore({
getItem: (key: string) => { ... },
setItem: (key: string, value: string) => { ... },
clearItem: (key: string) => { ... }
});
// later in the application
getSavedDAO();
saveDAO(dao);
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.