Skip to content

Container component mouse events / tooltip stopped working after upgrading react 18 -> 19 #3048

Open
@heinibee1

Description

@heinibee1

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/sandbox/victory-starter-forked-zfh44g?file=%2Fsrc%2FChart.tsx%3A7%2C18

Bug report

Before I was able to drag the chart and tooltip would pop out when nearing the scatter. Also scatters would grow in size when they because "active". After Upgrading to react 19, it seems like all the "pointer" events for the chart stopped working: not able to drag, not seeing the tooltip, scatters wont grow or react to hovering. 
Also the Scatter and Line components started to gave warnings with this typescript version:

'VictoryLine' cannot be used as a JSX component.
  Its instance type '{ state: {}; getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any; getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {}; ... 43 more ...; events: unknown; }' is not a valid JSX element.
    Types of property 'componentWillReceiveProps' are incompatible.
      Type '((nextProps: Readonly<EventMixinCommonProps>, nextContext: any) => void) | undefined' is not assignable to type '((nextProps: Readonly<any>) => void) | undefined'.
        Type '(nextProps: Readonly<EventMixinCommonProps>, nextContext: any) => void' is not assignable to type '(nextProps: Readonly<any>) => void'.typescript(2786)

Steps to reproduce

Expected behavior

Tooltip would pop out near scatter hover, scatters would grow on hover, chart is draggable on x dimension.

Actual behavior

None of the expected (previously working) stuff is happening.

Environment

- Device: desktop
- OS: macOS 15
- Node: 22

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