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

Improve performance on composite widgets #4212

Merged
merged 19 commits into from
Nov 16, 2024
Merged

Conversation

diegohaz
Copy link
Member

@diegohaz diegohaz commented Oct 15, 2024

Fixes #3567

This PR includes several updates (I should probably split some of them into separate PRs, but I'm too lazy):

  • The overall performance of composite widgets has been improved by consolidating multiple useSyncExternalStore calls into a single one using useStoreStateObject.
  • There are new experimental composite item components that accept two new props: offscreenBehavior and offscreenRoot. Currently, these components are only exported from the @ariakit/react-core package.
  • I also fixed Typeahead is not working correctly with virtualised select #3567 as part of the minor adjustments needed to make typeahead work with the new offscreen behavior.

Copy link

changeset-bot bot commented Oct 15, 2024

🦋 Changeset detected

Latest commit: 00cf0a4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@ariakit/react-core Patch
@ariakit/react Patch
@ariakit/core Patch
@ariakit/test Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codesandbox-ci bot commented Oct 15, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@diegohaz diegohaz changed the title Try CollectionItemOffscreen Improve performance on composite widgets Nov 16, 2024
@diegohaz diegohaz marked this pull request as ready for review November 16, 2024 13:46
@diegohaz diegohaz requested a review from benrodrs November 16, 2024 13:46
@diegohaz diegohaz merged commit 24c4aa7 into main Nov 16, 2024
16 checks passed
@diegohaz diegohaz deleted the collection-item-offscreen branch November 16, 2024 13:53
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.

Typeahead is not working correctly with virtualised select
2 participants