Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

React 18 double-render in Strict Mode breaks component #61

Description

@betaorbust

Description

In React 18, <StrictMode> was introduced, that effectively just re-renders everything twice to shake out memory leaks and unintended bugs.
It looks like this causes tiny-slider-react to throw or not show up on the page. By triggering on and off Strict Mode I can pretty reliably cause an error.

Reproduction

Here is a full repro case. Adjusting the TRIGGER_BUG variable to true will enable Strict Mode and cause the issues I've been seeing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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