Comments (8)
You should file this against Waku first to check if this is a framework or React issue. Waku may not be compatible with React 19 yet.
from react.
// Server Component
import A11yDecorator from "../../A11yDecorator";
This is a client component according to the repro: https://github.com/hipstersmoothie/waku-repro/blob/aec12ed7c9594950987157242f80cec86957a71e/src/A11yDecorator.tsx#L1
You probably mean CenteredDecorator
which is a Server Component?
from react.
This would be a test in ReactFlightDOMBrowser-test.js
that reproduces the issue:
it('should resolve deduped objects in nested children of blocked models', async () => {
let resolveOuterClientComponentChunk;
let resolveInnerClientComponentChunk;
const ClientOuter = clientExports(
function ClientOuter({children, value}) {
return children;
},
'1',
'/outer.js',
new Promise(resolve => (resolveOuterClientComponentChunk = resolve)),
);
function PassthroughServerComponent({children}) {
return children;
}
const ClientInner = clientExports(
function ClientInner({children}) {
return JSON.stringify(children);
},
'2',
'/inner.js',
new Promise(resolve => (resolveInnerClientComponentChunk = resolve)),
);
const value = {};
function Server() {
return (
<ClientOuter value={value}>
<PassthroughServerComponent>
<ClientInner>{value}</ClientInner>
</PassthroughServerComponent>
</ClientOuter>
);
}
const stream = await serverAct(() =>
ReactServerDOMServer.renderToReadableStream(<Server />, webpackMap),
);
function ClientRoot({response}) {
return use(response);
}
const response = ReactServerDOMClient.createFromReadableStream(stream);
const container = document.createElement('div');
const root = ReactDOMClient.createRoot(container);
await act(() => {
root.render(<ClientRoot response={response} />);
});
expect(container.innerHTML).toBe('');
await act(() => {
resolveOuterClientComponentChunk();
});
await act(() => {
resolveInnerClientComponentChunk();
});
expect(container.innerHTML).toBe('{}');
});
But it's basically the same scenario as the test should resolve deduped objects that are themselves blocked
, which was added in #29823, and this PR also fixed the bug.
from react.
Fixed in #29823.
The current plan is to release rc.1
after #29898 is resolve
from react.
I did. The example code is pretty light. I could potentially test against next.js too
cc @dai-shi
from react.
I originally thought it's a Waku's issue. But, as it turns out, it reproduces with changing React beta, without changing Waku.
@hipstersmoothie I would recommend to find which commit in React causes the error, and look for the background of the change. My gut feeling is that this change is intentional (for safety or something).
from react.
I can't repro this in React's test suite (#30194) but I can repro it in Next.js (https://github.com/eps1lon/waku-repro-as-nextjs):
TypeError: Cannot assign to read only property 'page' of object '#<Object>'
at eval (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js:2081:23)
at wakeChunk (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js:1739:5)
at initializeModelChunk (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js:1933:9)
at getOutlinedModel (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js:2148:7)
at parseModelString (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js:2404:18)
at Array.eval (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js:3260:14)
at JSON.parse (<anonymous>)
at parseModel (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js:3252:15)
at initializeModelChunk (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js:1918:17)
at Chunk.then (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js:1643:7)
from react.
So, is it an already fixed bug? I wonder if -rc.1
will be released.
from react.
Related Issues (20)
- [React 19] No re-render after 'useActionState' action queue finishes HOT 2
- Bug: No "exports" in use-sync-external-store package.json
- [React 19] Conditionally rendered suspendable component using `use()` shows fallback even if promise already resolved HOT 15
- [React 19]JSX asking that I should declare react at the top of the file HOT 3
- [React 19] RSC and `as` property pattern HOT 1
- [React 19] `use()` promise from state causes "async/await is not yet supported in Client Components" error HOT 3
- Bug: [Strict Mode] Inconsistent behavior updating reducer state in mount Effect vs. update Effect HOT 3
- Bug: Memory leak of old state until next render
- Bug:
- [React 19] style using precedence does not produce valid CSS when using string children HOT 2
- [React 19] style using precedence can produce many additional style elements after initial render HOT 6
- [Compiler]: Ref values (the `current` property) may not be accessed during render - showing error message for custom hooks HOT 5
- [DevTools Bug]: Inconsistent behavior; React dev tools does not recognize a react website; 'service worker(inactive)'
- Bug: Strict mode effect cleanup order doesn't match normal unmount HOT 4
- [DevTools Bug]: inspecting pseudo-elements in Firefox gives error `Permission denied to access property "__reactFiber$sofadm08s2"` HOT 1
- Bug: Image Preview Not Showing in Chrome and Other Browsers Except Safari
- [React 19] useActionState when firing the action multiple times doesn't behave like transition HOT 1
- [Compiler Bug]: eslint-plugin-react-compiler errors when updating initialization of ref.current HOT 8
- [React 19] Upgrading React causes infinite refetching HOT 2
- [React 19]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.