-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added DataStore that keep data on browser storage. #18
base: main
Are you sure you want to change the base?
Added DataStore that keep data on browser storage. #18
Conversation
Changed `LocalDataStore` names to `MockDataStore` for add new `LocalDataStore`. Before `LocalDataStore` store data on memory, so I think the name `MockDataStore` is more appropriate than `LocalDataStore`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be a conflict, please resolve it.
yarn.lock
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This repository already has package-lock.json
. It is undesirable to have two lock files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove yarn.lock
. thanks.
src/data_store/mock_data_store.js
Outdated
* | ||
* This DataStore is very simple store that save any data in flush memory. | ||
*/ | ||
class MockDataStore { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The word Mock is a misnomer because it reminds us of test mocks. MemoryStore
or similar would be appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using the local browser storage, there is a limit such as up to 10MB of space, but is this PR considered cases where data is stored beyond that limit?
# Conflicts: # src/data_store.js # ts_src/data_store.ts # types/data_store.d.ts
Runed `npm upgrade`. Because `npm install` failed in my local.
…ck` word is misleading.
Co-authored-by: Yamaguchi <[email protected]>
…ge_data_store # Conflicts: # package-lock.json
…' into feature/local_storage_data_store
Added `npm run format` in build script for helpful.
@Yamaguchi |
Implemented new
LocalDataStore
that store data on browser storage usingwindow.localStorage
.Changed
LocalDataStore
names toMockDataStore
for add newLocalDataStore
. Before'sLocalDataStore
store data on memory, so I think the nameMockDataStore
is more appropriate thanLocalDataStore
.