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

[bug] Rerendering modals on route change next js app router #3758

Open
ceeriil opened this issue Jan 28, 2025 · 3 comments
Open

[bug] Rerendering modals on route change next js app router #3758

ceeriil opened this issue Jan 28, 2025 · 3 comments
Labels
bug Something isn't working needs review

Comments

@ceeriil
Copy link

ceeriil commented Jan 28, 2025

Link to minimal reproducible example

https://github.com/reown-com/appkit-web-examples/tree/main/nextjs/next-solana-app-router

Summary

When integrating AppKit with Solana Wallet Adapter in a Next.js app using the App Router, the wallet disconnects on every route change. This results in modals (e.g., wallet selection) being re-rendered. The issue is evident in next js app multi-page setups where navigation between pages triggers the wallet adapter to disconnect.

Steps to Reproduce

  1. Set up a Next.js project using the App Router.
  2. Integrate AppKit and Solana Wallet Adapter following the provided example:
    Next.js Solana App Router Example.
  3. Navigate between different pages in the app.
  4. Observe that the wallet disconnects and modals re-render on each route change.

List of related npm package versions

@reown/appkit" "^1.6.3",
"@reown/appkit-adapter-solana": "^1.6.3",
"@reown/appkit-wallet-button": "^1.6.3",
"next": "15.0.1",

Node.js Version

v22.11.0

Package Manager

1.22.22

@ceeriil ceeriil added bug Something isn't working needs review labels Jan 28, 2025
Copy link

linear bot commented Jan 28, 2025

@ceeriil
Copy link
Author

ceeriil commented Jan 29, 2025

@magiziz @tomiir

@rtomas
Copy link
Contributor

rtomas commented Jan 31, 2025

can you create a minimal reproducible example ?

you can use this link ... https://stackblitz.com/github/reown-com/appkit-web-examples/tree/main/nextjs/next-solana-app-router

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs review
Projects
None yet
Development

No branches or pull requests

2 participants