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

feat: add loading state to useWeb3ModalState hook #1911

Merged
merged 4 commits into from
Apr 18, 2024

Conversation

enesozturk
Copy link
Contributor

@enesozturk enesozturk commented Feb 13, 2024

Breaking Changes

We are storing the loading state inside our scaffold which is managed in PublicStateController to make conditional renderings in UI depending on the client's (ethers/wagmi) loading statuses. While open/close states are exposed to hooks for developers, this loading state not exposed.

This PR introduces changes to share the loading state to the hooks.

Changes

  • feat: add loading state to useWeb3ModalState hook

Copy link

vercel bot commented Feb 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web3modal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2024 7:40am
web3modal-gallery ✅ Ready (Inspect) Visit Preview Apr 18, 2024 7:40am
web3modal-laboratory ✅ Ready (Inspect) Visit Preview Apr 18, 2024 7:40am
web3modal-react-wagmi-ex ✅ Ready (Inspect) Visit Preview Apr 18, 2024 7:40am
web3modal-vue-wagmi-ex ✅ Ready (Inspect) Visit Preview Apr 18, 2024 7:40am

tomiir
tomiir previously approved these changes Feb 21, 2024
Copy link
Collaborator

@tomiir tomiir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@tomiir
Copy link
Collaborator

tomiir commented Feb 29, 2024

@boidushya we'd need some docs update on this right?

@boidushya
Copy link
Contributor

@boidushya we'd need some docs update on this right?

yep! This relevant to React, Next & JS right? I'll go ahead and open a PR.

@enesozturk
Copy link
Contributor Author

@tomiir @svenvoskamp @ignaciosantise I think not it's handling loading better. Could you review it again?

@enesozturk enesozturk requested review from tomiir and svenvoskamp March 4, 2024 10:04
Copy link
Collaborator

@tomiir tomiir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ignaciosantise for a double check

Copy link
Collaborator

@ignaciosantise ignaciosantise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 looking good!

just left you a question

@glitch-txs
Copy link
Contributor

Can we add a small description on what this state is tracking? It's not 100% clear to me

@enesozturk enesozturk force-pushed the refactor/loading-state-in-useweb3modalstate-hook branch from 5986bfb to f018d16 Compare April 18, 2024 07:32
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

Successfully merging this pull request may close these issues.

5 participants