Skip to content

React Strict mode that causes event listeners to not reattach properly #712

@arjuap

Description

@arjuap

I'm submitting a...

  • bug

What is the current behavior

When using react-financial-charts in a Next.js app, hovering over the chart does not display the hover marker or trigger the HoverTooltip. The HoverTooltip content callback does not get executed, and hover events do not fire as expected.

This issue occurs only in the Next.js environment during development with React Strict Mode enabled. However, the same component works correctly when used in Storybook.

What is the expected behavior

Hovering over the chart should display:

A hover marker.
The tooltip with details such as open, high, low, and close values.
The HoverTooltip content callback should trigger, as it does in Storybook.

Please tell us about your environment

  • Version: 1.1.0
  • Browser: [all | Chrome XX | Firefox XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari ]
    -React Version: 18.
    -Next.js Version: 14.2.4
    -Operating System: Windows 11#### Other information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions