-
Notifications
You must be signed in to change notification settings - Fork 650
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
feat(Transition): Add findDOMNode prop #457
Conversation
Is this the path forward that we want? I'd imagine that reactjs/rfcs#97 would supersede this in a nicer way. |
At which point we drop |
It'd be a breaking change to remove this API, though. |
I think in the short term we probably just want to switch to full ref props, and cut a breaking release. I'm not in a huge rush for that tho, but we can make breaking releases. The reticence here to add new public api's is that this is all to work around a warning in strict mode, not an actual bug. It's just generally lower priority to fix, especially when weighed against public API changes required |
Sure. But I wasn't the one to suggest a (maybe) future feature of react.
I see this argument all the time: "It's just a warning". This is just not realistic for library authors. Especially if this is a transitive dependency. There is currently no way in react development to filter out deprecation warnings, prop types warnings or internal react warnings. These are all the same. A runtime warning in transitive dependencies is considered a bug by many people. It adds at least a lot of noise that is indistinguishable from actual errors in the console.
Strict mode and concurrent mode. I'm not sure how findDOMNode behaves in that mode. Might be a bug there. It's especially a bug while testing.
It's an addition with virtually zero runtime overhead and (fairly certain) no bundle size increase. If you're not interested in being strict or concurrent mode ready then I can close this. |
Believe me, I HEAR you on this, I maintain a ton of react libraries. The plain fact tho is this is not a bug and it doesn't benefit us as maintainers to accept the incorrect claim that they are from some users. React, itself holds this position, is explicitly about how these are not bugs. It's not a tenable position for maintainers to have to drop everything on every minor and patch version of react to silence new warnings,
These are strict mode warnings so are entirely opt in.
We very interested in being ready! I even offered an approach above. This is not about refusing to the fix the problem, but in fixing it in a sustainable way and with a look to future proofing, API churn reduction etc. We want to fix this, but there is currently no pressing rush to do so that we need to pick a less optimal solution. |
Sounds fair to me. Let's say we might be able to determine in a component if we're in a strict mode tree. Would you be open to skip the Edit: Probably not good either. Causes the component to run different in development and production. |
b6fd364
to
aa22d25
Compare
Useful for strict mode compatibility.
aa22d25
to
f87d6b0
Compare
🎉 This issue has been resolved in version 4.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Useful for strict mode compatibility. Part of #429.
Started out with something along the lines of a
skipDOMNode
but this would've been equivalent to<Transition findDOMNode={() => undefined} />
. Current solution allows more flexibility by preserving the call signature of the state transition callbacks while being strict mode compatible with regards tofindDOMNode
deprecation.Not sure how/if I should update the docs.