Skip to content

React 19 fixes #705

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

Merged
merged 7 commits into from
May 20, 2025
Merged

React 19 fixes #705

merged 7 commits into from
May 20, 2025

Conversation

stephentuso
Copy link
Contributor

@stephentuso stephentuso commented May 5, 2025

Summary:

Fixes #701
Fixes #695

defaultProps and findDOMNode were removed in React 19.

For findDOMNode: it wasn't actually needed, as the ref is already pointed at the element. I added dom to the TS libs to support the type, but we can use a ts-ignore if you don't want that.

For defaultProps: I moved the values to default parameters in the function component and cleaned up the logic some

Test Plan:

example-web is updated to react 19 and fully working now.

I haven't gotten a chance to test this on native yet

@smalhotra3599
Copy link

@stephentuso @BartoszKlonowski any update on when this will get merged and released? This is breaking my app currently and since it seems like you all have a solution, I'd rather just wait for you to handle it then to reimplement the slider all together. Appreciate your help, thanks!

@stephentuso
Copy link
Contributor Author

@smalhotra3599 if it's just the web version you're having issues with, I'm using this patch based on this PR until they merge it https://gist.github.com/stephentuso/4e1daf6aea8489407138addd4c5ceb5d

Copy link
Member

@BartoszKlonowski BartoszKlonowski left a comment

Choose a reason for hiding this comment

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

I am happy to approve it as soon as the matter of removing arguments of SliderComponent is resolved. Other than that, good PR. I tested it locally for Android and can confirm it also solves the linked issue.
Thanks for handling that! 👍

Copy link
Member

@BartoszKlonowski BartoszKlonowski left a comment

Choose a reason for hiding this comment

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

Thanks for explanations!
Just couple of linter complaints covered, and it's good to go.

@BartoszKlonowski BartoszKlonowski merged commit d60525d into callstack:main May 20, 2025
9 checks passed
BartoszKlonowski added a commit that referenced this pull request May 20, 2025
* chore: update example to react 19

* fix: support react 19 on web

* fix: fix default value issues

* chore: update example

* chore: remove debug logs

* chore: simplify default var and format

* Revert the formatting changes

---------

Co-authored-by: Bartosz Klonowski <[email protected]>
@zbarbuto
Copy link

Thanks for merging - can this fix please be published to npm?

@stephentuso stephentuso deleted the web-fix-19 branch May 21, 2025 15:49
@qwezey
Copy link

qwezey commented May 22, 2025

Will this be published to npm? This would help out a lot.

@BartoszKlonowski
Copy link
Member

Dears, @zbarbuto, yes - I plan to release this today, in both v4.5.7 supporting old arch, as well as in default, v5.0.0 supporting new arch only.
Please check the existing pull request and/or releases for more details.

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.

findDOMNode usage breaks on React 19 with react-native-web 0.20+ android - sliding broken on RN 0.79 (rc3)
5 participants