Skip to content

[Nextjs 15] Getting Cannot read properties of undefined (reading 'props') when using containerComponent alongside VictoryLegend #3071

@MuMaestro

Description

@MuMaestro

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Victory version

^37.3.6

Code Sandbox link

https://codesandbox.io/p/devbox/ecstatic-glitter-y4ccd6

Bug report

Wherever I use victory chat with `containerComponent` and a `vitoryLegend` child, with Nextjs 15+, the following error is thrown:

`Cannot read properties of undefined (reading 'props')`

When `containerComponent` or `victoryLegend` is removed from the example, the error is not thrown

Steps to reproduce

1. Go to sandbox
2. Erro is thrown rightaway

Expected behavior

Its expected that the use os containerComponents do not affect the use of legends, as the zoom is for the contents of the graph, and not the graph itself.

Actual behavior

Environment

- Device: Desktop
- OS: Linux, (Ubuntu 22 localhost, diferent distros for deployment)
- Node: 22
- Browser: Chrome
- version: 37

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Bug 🐛Oh no! A bug or unintentional behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions