ton-connect / sdk

SDK for TON Connect 2.0 — a comprehensive communication protocol between wallets and apps in TON ecosystem
Apache License 2.0
326 stars 92 forks source link

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

Open NicolasCassunde opened 3 months ago

NicolasCassunde commented 3 months ago

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 (

{children}

); } `

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

ellemedit commented 3 months ago

we need to upgrade jsx transformer perhaps

DAHCROWN commented 3 weeks ago

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

realmarkoprifti commented 3 weeks ago

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

hamidkhaleghi commented 2 weeks ago

SAME ISSUE HERE

hamidkhaleghi commented 2 weeks ago

maybe the best solution would be downgrading into next14 and react18

realmarkoprifti commented 2 weeks ago

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

DAHCROWN commented 2 weeks ago

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

bytemtek commented 2 weeks ago

Still same+

DKeken commented 1 week ago

same

realmarkoprifti commented 1 week ago

@thekiba bro, mind taking a look?

realmarkoprifti commented 1 day ago

yo guys, any update?

KlotzJesse commented 21 hours ago

@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\/.*/],