Skip to content
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

Cache State on Browser Refresh #1570

Open
jdubpark opened this issue Aug 7, 2023 · 0 comments
Open

Cache State on Browser Refresh #1570

jdubpark opened this issue Aug 7, 2023 · 0 comments

Comments

@jdubpark
Copy link

jdubpark commented Aug 7, 2023

Is your feature request related to a problem? Please describe.

Next.js + Web3Auth modal integration introduces a short "blank" cycle between when the browser refreshes and when the Web3Auth credential data is fetched. This leads to a very short-lived "loading" screen on each browser refresh, as the React state starts as an object of undefined/empty values and, after a quick fetch from Web3Auth API, loads the correct object of credentials.

Describe the solution you'd like

Caching the fetched Web3Auth state between browser refreshes, so that users have better UX. More specifically, have a cache of browser state available during the time between the browser refreshed and the Web3Auth credential fetch is complete.

Additional context

I'm using Redux Toolkit for my app and have tried redux-persist to cache some serializable data, like web3Auth provider and user without success.

@Web3Auth Web3Auth deleted a comment from Thebeast44 Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant