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

Set up wagmi + rainbowkit. #2

Merged
merged 7 commits into from
Jul 13, 2023
Merged

Set up wagmi + rainbowkit. #2

merged 7 commits into from
Jul 13, 2023

Conversation

idiom-bytes
Copy link
Member

@idiom-bytes idiom-bytes commented Jul 13, 2023

This ticket is dependent on if we want to try to use this stack.

Fixes #1

Problem:

  1. Majority of web3 wallets rely on react-query which were breaking recently w/ latest next/react.
  2. next/react-query were having conflict due to FB dropping a function named unstable_batchedUpdates
  3. Although this works on local dev, it breaks the build which then becomes undeployable in vercel (breaking DX).

Outline

  1. Recently, there was a new react-release from FB that supposedly addressed this issue.
  2. There have also been work-arounds for Next13 wrt tanstack.

Further technical details

Please see comments below

Current Blocker

(Problem 2) - I believe latest react release should address the requirements, however I do not seem to be getting it resolved.

Alternative candidates:

  1. Go back to Thirdweb, and adapt their Next13/React18 implementation

@vercel
Copy link

vercel bot commented Jul 13, 2023

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

Name Status Preview Comments Updated (UTC)
tokengated-next-chatgpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 13, 2023 11:54pm

@idiom-bytes
Copy link
Member Author

idiom-bytes commented Jul 13, 2023

Following these threads to fix issue w/ tanstack.

TanStack/query#4933
TanStack/query#5023

Here is the error in a sandbox:

https://codesandbox.io/p/sandbox/quizzical-sinoussi-efxh45?file=%2Fapp%2Fpage.tsx%3A1%2C1&selection=%5B%7B%22endColumn%22%3A1%2C%22endLineNumber%22%3A6%2C%22startColumn%22%3A1%2C%22startLineNumber%22%3A6%7D%5D

Here is a sandbox w/ the issue fixed:

TanStack/query#4933 (comment)
https://codesandbox.io/p/sandbox/next13-app-react-query-stgw3e?file=%2Fapp%2FgetPosts.ts%3A1%2C1

Here is another outline of the supposed steps, working for a next13 app:

https://blog.gogrow.dev/setting-up-react-query-in-your-next-js-13-app-e8edea0d20cc

Here is the tanstack pointing to a PR by FB to update react :

[DOM] Add unstable_batchedUpdates to server-rendering-stub < pushed ~2 weeks ago
tanstack => TanStack/query#5023 (comment)
fb-react => facebook/react#27028

Release name: [18.3.0-canary-1fdacbefd-20230630]

Release commit: vercel/next.js@1ae3f42
Release package: https://www.npmjs.com/package/react/v/18.3.0-canary-0210f0b08-20230525?activeTab=versions

Still getting issues... resuming tomorrow.

@idiom-bytes idiom-bytes marked this pull request as draft July 13, 2023 19:46
@idiom-bytes
Copy link
Member Author

Tested, still seems to be working. Noticed an issue with chat history not being saved, probably a config issue w/ supabase, will dig later.

Great work @kdetry

@idiom-bytes idiom-bytes merged commit ed19900 into main Jul 13, 2023
1 check passed
@idiom-bytes idiom-bytes deleted the issue1-setup-web3-wallet branch July 13, 2023 23:59
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.

Setup web3 wallet
1 participant