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

Warning: findDOMNode is deprecated outside StrictMode. #706

Closed
keyboy21 opened this issue Apr 28, 2024 · 17 comments
Closed

Warning: findDOMNode is deprecated outside StrictMode. #706

keyboy21 opened this issue Apr 28, 2024 · 17 comments

Comments

@keyboy21
Copy link

keyboy21 commented Apr 28, 2024

Hi, Has any updates to remove findDOMNode. In react 18.3 adds warnings for deprecate this API and in v19 will be removed.

thanks.

Prev related issue: #282

@MatthewHerbst
Copy link
Owner

Hey, thanks for raising this. I saw the patch notes the other day and was like, whelp, that's going to be a fun one 😄
I believe the change here might require us to make a breaking change to the type of our content prop. Not totally sure on that one. I'll look into this next weekend and report back. I wouldn't mind making a breaking change honestly, there are a few changes that I've been meaning to make for a while that would require a breaking change and this might finally be an excuse to do that

@RISHIKESHk07
Copy link

@MatthewHerbst @yusuf-saydullayev any update on this ?

@MatthewHerbst
Copy link
Owner

Currently working on v3 of this library which will introduce some long needed breaking changes that will also allow supporting React 19 properly. I expect to have a beta release out by the end of the weekend

@MatthewHerbst
Copy link
Owner

MatthewHerbst commented Jun 18, 2024

Removing findDOMNode is proving more challenging than I had expected. Getting the underlying DOM Element, not the React component wrapping it, is proving to be a PITA. Still working on this, delayed getting a beta out by a few days

@Dillpickleschmidt
Copy link

Removing findDOMNode is proving more challenging than I had expected. Getting the underlying DOM Element, not the React component wrapping it, is proving to be a PITA. Still working on this, delayed getting a beta out by a few days

Has the beta been released somewhere? I apologize if you're still working on it, just trying to make sure I'm not crazy for not seeing it anywhere since you wrote this 2 weeks ago.

@MatthewHerbst
Copy link
Owner

You're not crazy, I'm still fighting with it unfortunately, it's a pretty core change to how this library operates. Looking forward to the long weekend to get this over the finish line, at least with some sort of v3-alpha release

@MatthewHerbst
Copy link
Owner

MatthewHerbst commented Jul 8, 2024

Update: I went down a rabbit hole trying to also get an ESM build out finally as part of v3. I think I'm going to give that up for now and just push the fix for React 19, targeting getting a release out this evening unless I run into some other issue. Will keep y'all updated. It's just me on this project, so I appreciate everyone's patience

@RADesai
Copy link

RADesai commented Jul 11, 2024

Your efforts are appreciated @MatthewHerbst

@raffidahmad
Copy link

react-draggable has an alternative to findDOMnode by using the ref, maybe that could help?

@MatthewHerbst
Copy link
Owner

MatthewHerbst commented Jul 15, 2024

Alright friends, the day has arrived! Please give v3.0.0-beta-1 (npm install react-to-print@beta) a shot and let me know how it works for you. There are a signifiant number of breaking changes though they should be fairly straightforward to migrate. Feedback is massively appreciated. Thank you all for your patience

@Alexandredc
Copy link

Thank you @MatthewHerbst 🎉
Migration is very easy !

@MatthewHerbst
Copy link
Owner

MatthewHerbst commented Jul 22, 2024

Going to let v3 beta bake for the rest of the week. If all is well after that I'll promote this out of beta this coming weekend

@strarsis
Copy link

Awesome!

@drscottlobo
Copy link

Any progress on making these changes official?

@MatthewHerbst
Copy link
Owner

Ah, apologies, work has had me slammed and I haven't had time to look at this for a bit. I haven't had any more reports of issues with the beta so I will get it published as v3.0.0 before the weekend ends. Thanks for reminding me!

@drscottlobo
Copy link

Thank you!

@MatthewHerbst
Copy link
Owner

v3.0.0 has been published! Thanks everyone for your help and patience

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

No branches or pull requests

9 participants