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 strict mode warnings for Collapse component #1992
Fix strict mode warnings for Collapse component #1992
Conversation
Would also need use the nodeRef API, since RTG still uses findDOMNode under the hood. |
I've tested the specific component with strict mode and no warnings were shown. How can I can reproduce the situation to get strict mode warnings with RTG? |
You'll need to trigger an animation to see the warning, like clicking the toggle button on the collapse examples. |
@kyletsang Thanks for the tips, I've updated the code to use the new |
Why is not merged? |
@cesarve77 the changes would increase the minimum required React version from |
Is there anything that I can do to help get this merged? The findDOMNode deprecation warning in the console makes me worry. |
@stdavis I've updated the PR to the latest I'd ask the library's maintainers to take a look at the changes again and tell me if there's anything else that needs to be done to get this merged. It should fix all of the |
This looks good to me! Hopefully it gets some attention. Thanks, @GabrielMajeri ! |
Any updates on this ? |
Please merge this. |
Seems like the Collapse documentation isn't working after the above changes: https://deploy-preview-1992--reactstrap.netlify.app/?path=/docs/components-collapse--collapse |
src/Collapse.js
Outdated
@@ -102,6 +110,8 @@ class Collapse extends Component { | |||
...otherProps | |||
} = this.props; | |||
|
|||
const nodeRef = innerRef || this.nodeRef; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't be needed anymore after the above changes.
Everything looks good, just a few changes and maybe a rebase is needed as the documentation seems broken for the Collapse component. |
Thank you for the feedback @davidacevedo. I've committed the corresponding changes and rebased the pull request against the latest |
I've pushed a new commit, addressing the lint and formatting issues encountered in CI. |
Updates the
react-transition-group
dependency to help with compatibility with React strict mode.Helps towards fixing #1340
Supersedes #1907