Docs: Wrong syntax in example @ technical-reference useViewCast
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- documentation
Research direction
Open docs/mini-apps/technical-reference/minikit/hooks/useViewCast.mdx and compare the useViewCast example with the proposed syntax in the issue. Verify the corrected snippet against the hook's documented API, then update the example so it is valid and confirm the rendered documentation shows the working usage.
Written by the indexing model from the issue text.
Description
Hi there!
I've just found a non-working snippet, here's a proposed fix too.
- Issue: Wrong syntax in the useViewCast hook code example
Current implementation:
const viewSharedCast = useViewCast(sharedCastHash);
// ...
{sharedCastHash && (
<button onClick={viewSharedCast}>
View My Share
</button>
)}
Expected:
const { viewCast } = useViewCast();
const viewSharedCast = () => {
if (sharedCastHash) {
viewCast({
hash: sharedCastHash,
close: false
});
}
};
// ...
{sharedCastHash && (
<button onClick={viewSharedCast}>
View My Share
</button>
)}
- Dominant language
- JavaScript
- Stars
- 337
- Forks
- 798
- Avg merge
- 7h 24m
- Merged PRs (30d)
- 51
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from base/docs
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·
-
client-controller-update ta-bot-triage team-money-movement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MetaMask/metamask-mobile#36594 ·