Loading status indicator / 'readiness' indicator for `useContract`
See original GitHub issueContracts take some time to load. Right now, if someone wrote this:
const greeterContract = useContract(xxx,xxx);
Then greeterContract
will go through the following lifecycle:
null ----> { } (empty object) ----> actual contract object (ready)
Because of that weird empty object state in the middle, just doing
if (!greeterContract)
doesn’t work.
We need to ship an indicator that notifies the user when the contract is ready. Something like:
const [contract, ready] = useContract(___, ___);
// ready becomes true when the contract has finished loading
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
FIS User Manual - UCSC Financial Affairs
Open invoices with Cancel indicator of "N" have payables re-established. Canceled check number will display until replacement check is issued for re-established ...
Read more >Contract vs. Spot Rates: What's the Difference in Truckload ...
Shipper's guide to committed freight pricing, when to use spot and how to host an RFP.
Read more >How to build a Dapp - Interacting with a smart contract using ...
How to interact with your smart contract using React, useDApp and Ethers ?In the first tutorial we made a simple smart contract for...
Read more >Reserve Component (DJMS-RC) Procedures Manual
Table 2-1: Pay status and active duty codes ... The NPS indicator is “6” for NPS Soldiers and blank for all others.
Read more >2017 BLM National Aviation Plan
External Load Weight Indicator in cockpit; Wire strike protection system (mechanical);. Two panel-mounted VHF-AM and two panel-mounted VHF-FM radios; One ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Dhaiwat10 Hello! I was blocked for a second by the thought that this is too easy 😅 Anyhow, I made a PR, please review it when you have the time and if there are any improvements that I can make, please let me know. Also, do I need a Changeset?
Actually, I think we need a
minor
bump lol. Sorry for the confusion @CatalinCsnMaster