mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #695] useEffect callbacks never fire after RSC hydration on Cloudflare Workers (App Router, "use client" pages) #148
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Hitesh-Sisara on GitHub (Mar 27, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/695
Description
useEffectcallbacks in"use client"components never execute after RSC hydration when deployed to Cloudflare Workers. Components render correctly (JSX tree appears in DOM, React fiber tree is present), but React's passive effects are never flushed. Any client-side data fetching or side effects insideuseEffectsimply don't run.Environment
0.0.35(also reproduced on0.0.27)8.0.31.30.10.5.2119.2.416.0.10wrangler deployvite.config.ts
Reproduction
Every page in our app is a
"use client"component that fetches data viauseEffect. Minimal example:What happens
useEffectcallback never fires — no console.log, no fetch, no state updateEvidence from Chrome DevTools
We inspected the live deployed site extensively:
worker-entry-*.js,framework-*.js,index-*.jsall return 200.rscresponses contain correct component references (I["hash",[],...])__reactFiber$*present on DOM elements, component state initializedfetch()from console returns 200 with dataeffect.tag === 8) butcreate()never calledWhat we tried
0.0.27to0.0.35— same behaviorvinext buildcompletes successfully with all 20 routes detectedvinext checkreports 94% compatibility with no blocking issuesvinext devlocally — issue only in production on WorkersExpected behavior
useEffectcallbacks should execute after RSC hydration completes, matching standard Next.js behavior.