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

[<UI-REACT>]: React 19 + Next 15 #216

Open
NicolasCassunde opened this issue Jul 30, 2024 · 14 comments · May be fixed by #289
Open

[<UI-REACT>]: React 19 + Next 15 #216

NicolasCassunde opened this issue Jul 30, 2024 · 14 comments · May be fixed by #289
Assignees
Labels
bug Something isn't working

Comments

@NicolasCassunde
Copy link

Describe the bug

TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')

"use client"; import { TonConnectUIProvider } from "delab-tonconnect-ui-react"; export function Providers({ children }: { children: React.ReactNode }) { return ( <TonConnectUIProvider manifestUrl="https://web.example.com/"> {children} </TonConnectUIProvider> ); }

Expected behavior

works :D

Current behavior

Captura de Tela 2024-07-30 às 00 31 39

Steps to Reproduce

pnpx create-next-app@rc --empty + install ton connect react

Environment

next 15, react 19, macos

Additional context

No response

@NicolasCassunde NicolasCassunde added the bug Something isn't working label Jul 30, 2024
@ellemedit
Copy link

we need to upgrade jsx transformer perhaps

@DAHCROWN
Copy link

Yeah, i'm having the exact problem in my projejct

@realmarkoprifti
Copy link

realmarkoprifti commented Oct 28, 2024

Yo, anyone found a solution yet? Currently working on a big dApp and don't have time to take a look myself :)

@hamidkhaleghi
Copy link

SAME ISSUE HERE

@hamidkhaleghi
Copy link

maybe the best solution would be downgrading into next14 and react18

@realmarkoprifti
Copy link

Yeah but, having the perks of Next 15 like turbopack would be great, I think.

@DAHCROWN
Copy link

DAHCROWN commented Nov 6, 2024

I guess so, i actually downgraded the project to Next 14. I think this would be resolved in a later update

@bytemtek
Copy link

bytemtek commented Nov 8, 2024

Still same+

@DKeken
Copy link

DKeken commented Nov 12, 2024

same

@realmarkoprifti
Copy link

@thekiba bro, mind taking a look?

@realmarkoprifti
Copy link

yo guys, any update?

@KlotzJesse
Copy link

@thekiba can be fixed by correctly not bundling react by setting the external option in the vite.config to:
external: ["react", /^react\/.*/, "react-dom", /react-dom\/.*/],

@rodnoycry
Copy link

I just changed my dependency from @tonconnect/ui-react to @tonconnect/ui, went to https://github.com/ton-connect/sdk/tree/main/packages/ui-react and copied all files from there, since they are just relatively simple wrappers around @tonconnect/ui library

Then I just imported components from copied files and it works fine so far, I don't think it will cause any issues in a future but I will make update of this comment if something will brake

@kimdanielarthur-cowlabs

Is there any chance this will be fixed in any upcoming releases now that react 19.0.0 is stable also? Thanks!

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

Successfully merging a pull request may close this issue.