Skip to content

Test @wix/interact against React 18 and React 19 in CI #195

@tombigel

Description

@tombigel

Context: #174 (PR #194) widened the react/react-dom peer range to accept React 18 and 19, but dev dependencies still pin React 18, so CI only exercises the React 18 code path.

The React integration in packages/interact/src/react/ has explicit branches for React 18 vs. React 19 ref-callback semantics:

  • Interaction.tsx returns a cleanup from the ref callback (React 19+ only).
  • interactRef.ts handles unmount via null-arg (React 18) and via returned cleanup (React 19+).

Both branches should be exercised in CI.

Proposal

Add a matrix job to CI that runs yarn workspace @wix/interact test against both React versions. Sketch:

  • Keep the workspace dev deps on one version (probably React 19 going forward).
  • In the matrix job for the "other" version, reinstall react, react-dom, @testing-library/react, and @types/react* to the matrix version before running tests — either via a script that edits packages/interact/package.json in-place or via an install overlay.

Out of scope

  • Deciding whether to bump the published .d.ts build to @types/react@19 — separate concern.
  • Deprecating React 18 support — not planned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions