dai-shi / waku

⛩️ The minimal React framework
https://waku.gg
MIT License
3.91k stars 102 forks source link

chore: bump to react@19-beta #688

Closed himself65 closed 2 weeks ago

himself65 commented 2 weeks ago

Closes: https://github.com/dai-shi/waku/pull/671 Upstream: https://github.com/facebook/react/pull/28921

vercel[bot] commented 2 weeks ago

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

1 Ignored Deployment | Name | Status | Preview | Updated (UTC) | | :--- | :----- | :------ | :------ | | **waku** | ⬜️ Ignored ([Inspect](https://vercel.com/daishis-projects/waku/Cctw7TNQbNyWMHTt3cFh6mxFeDiD)) | [Visit Preview](https://waku-git-fork-himself65-update-react-beta-daishis-projects.vercel.app) | May 1, 2024 1:03am |
codesandbox-ci[bot] commented 2 weeks ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

himself65 commented 2 weeks ago

Whoops, async local storage is not working for some reasons

image
himself65 commented 2 weeks ago
var supportsRequestStorage = "function" === typeof AsyncLocalStorage, requestStorage = supportsRequestStorage ? new AsyncLocalStorage() : null;

I think the reason is, as I said, it edge / worked (Cloudflare worker) AsyncLocalStorage is under globalThis, so React will access it by only AsyncLocalStorage; that's why it's false here

https://github.com/facebook/react/blob/4508873393058e86bed308b56e49ec883ece59d1/packages/react-server/src/forks/ReactFlightServerConfig.dom-edge.js#L14-L17

I checked diff and there's no AsyncLocalStorage related changes, so I think there's some new timing issue now

/cc @dai-shi

himself65 commented 2 weeks ago

OK I found the issue, file name changed, but I think don't use workerd is a better way