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: fallback for startTransition for React <18 #152

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

jameshartig
Copy link
Contributor

@jameshartig jameshartig commented Nov 16, 2023

About the changes

Fallback when startTransition isn't supported, notably in React <18.

Closes #151

Important files

Discussion points

I did have to do something a little hacky to trip up webpack's export analysis. I originally tried the .toString() version that's suggested in the linked webpack issue but that made the typescript inference break.

I wasn't sure how to write tests but I did test this across 2 repos, one with React 16 and one with React 17 and it seems to work fine.

@nunogois nunogois requested a review from Tymek November 17, 2023 08:19
@Tymek Tymek merged commit 8813e5b into Unleash:main Nov 27, 2023
4 checks passed
@Tymek
Copy link
Member

Tymek commented Nov 27, 2023

Out now in v4.1.1

@jameshartig jameshartig deleted the start-transition-fallback branch November 27, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4.x requires React 18
2 participants