Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RAC collections in React canary versions #4518

Merged
merged 2 commits into from
May 13, 2023
Merged

Fix RAC collections in React canary versions #4518

merged 2 commits into from
May 13, 2023

Conversation

devongovett
Copy link
Member

Fixes #4390

This runs our tests against the new React Canary versions in CI. Next.js is using the canary version in their latest version, and this is now an officially supported setup by the React team.

As reported in #4390, the React Aria Components collection implementation was broken in the canary versions of React because our hack of using the multiple prop to pass through an object to the underlying fake DOM node no longer works. This is fixed by using a callback ref to imperatively set the props ourselves. This seems cleaner anyway and also fixes the issue in Next.js.

@rspbot
Copy link

rspbot commented May 12, 2023

@rspbot
Copy link

rspbot commented May 12, 2023

## API Changes

unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }

Copy link
Member

@reidbarber reidbarber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice to have this tested and good fix for RAC

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, managed it without the useLayoutEffect

@devongovett devongovett merged commit 98cad3f into main May 13, 2023
@devongovett devongovett deleted the react-canary branch May 13, 2023 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table isRowHeader error (Next.js 13.3 + react-aria-components)
4 participants