-
Notifications
You must be signed in to change notification settings - Fork 950
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
add basic example to show connected address #721
Conversation
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.
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.
👍
@technophile-04 I have code in se-2 projects that uses useAccount without adding |
@damianmarti This only happens after migrating to the Next App Router (we did it a couple of weeks ago in #535) |
Or you have 'use client' in parent components/page |
Tysm all merging it 🙌 |
* Add Optimism Sepolia config (#711) * Use arbitrumSepolia instead of Goerli (#716) * up rainbowkit version to 1.3.5 (#719) * removing lock file * use next-themes to handle theme and update usehooks-ts (#707) * Feat: Better complex struct inputs (#702) * improve debug struct UI (#726) * add basic example to show connected address (#721) --------- Co-authored-by: winnsterx <[email protected]> Co-authored-by: Shiv Bhonde | shivbhonde.eth <[email protected]> Co-authored-by: Carlos Sánchez <[email protected]>
Description
Context: If you directly use
useAccount
/ any other hooks on home you get the below error from Next which is not at all helpful and hard to debugNot so helpful error:
The solution to this is adding "use client" at the beginning of the file (this might be not all obvious for beginners)
This PR adds a default example of showing the connected address (this way we have "use client" at the top of file already and might save some users from pitfalls)
Please feel free to suggest any other place where we could add currently added it below SE-2 text :
Demo Video
Screen.Recording.2024-02-14.at.12.50.37.PM.mov