-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Storing API Key and recent source docs locally #115
Conversation
} catch (error) { | ||
console.log(error); | ||
} | ||
} |
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.
Any particular reasons why these local storage functions are async? AFAIK local storage web api are sync in nature. Doesnt seem like any async thing happening here.
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.
yeah I thuogth they maybe should be synchronous but wasnt sure. will change
Right now the localstorage and redux are distinct and we are using them together on APIKeyModal mount. This might be the reason why the flash shows up. There should be a better way to sync localstorage and redux together. I dont have a very concrete solution in my mind right now but looking into middlewares would be helpful. We only should be talking to redux in our component layer, rest all should be handled in other layers. https://stackoverflow.com/questions/35305661/where-to-write-to-localstorage-in-a-redux-app |
No description provided.