Skip to content

[React 19] Cannot assign to readonly property #30172

Closed
hipstersmoothie/waku-repro
#1
@hipstersmoothie

Description

@hipstersmoothie

Summary

I'm using https://waku.gg to use react components. I was trying to upgrade to the latest 19 rc and I started getting getting this error:

image

I boiled down the app into just a few file to demonstrate the issue here

The issue is as follow:

// Client context Provider
import { StoryContextProvider } from "../../components/Context";
// Server Component
import A11yDecorator from "../../A11yDecorator";
// Client Component
import CenteredDecorator from "../../CenteredDecorator";

export default function Iframe() {
  const page = {};

  return (
    <StoryContextProvider value={{ page }}>
      <CenteredDecorator page={page}>
        <A11yDecorator page={page}>
          foo
        </A11yDecorator>
      </CenteredDecorator>
    </StoryContextProvider>
  );
}

Some observations:

  • If I switch the order of A11yDecorator and CenteredDecorator, the app renders
  • If I don't use a shared page variable and just pass objects to the relevant places, the app renders
  • If I spread the page and make an new object when passing to the relevant places, the app renders

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions