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.
Context: #174 (PR #194) widened the
react/react-dompeer 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.tsxreturns a cleanup from the ref callback (React 19+ only).interactRef.tshandles 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 testagainst both React versions. Sketch:react,react-dom,@testing-library/react, and@types/react*to the matrix version before running tests — either via a script that editspackages/interact/package.jsonin-place or via an install overlay.Out of scope
.d.tsbuild to@types/react@19— separate concern.