Skip to content

React 19 deprecation warning: InternalMosaicWindow2 accesses element.ref #225

@printfn

Description

@printfn

I'm seeing this deprecation warning when using React 19:

Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release. Component Stack: 
    InternalMosaicWindow2 MosaicWindow.tsx:64
    ConnectedInternalMosaicWindow MosaicWindow.tsx:260
    MosaicWindow2 react-mosaic-component.js:8857
    div unknown:0
    div unknown:0
    MosaicRoot2 MosaicRoot.tsx:15
    div unknown:0
    MosaicWithoutDragDropContext2 react-mosaic-component.js:7861
    DndProvider2 DndProvider.tsx:28
    Mosaic2 react-mosaic-component.js:7994

It would probably make sense to access element.props.ref and fall back to element.ref if that doesn't exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions