Closed himself65 closed 2 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
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.
Whoops, async local storage is not working for some reasons
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
I checked diff and there's no AsyncLocalStorage related changes, so I think there's some new timing issue now
/cc @dai-shi
OK I found the issue, file name changed, but I think don't use workerd is a better way
Closes: https://github.com/dai-shi/waku/pull/671 Upstream: https://github.com/facebook/react/pull/28921