Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do and why?
Investigation into antd and modal issues:
This issue can't be closed until antd hits v5 release.
Antd is using
findDomNode
, you can see the error in the dev console today.https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage
when we bump up to react 18,
findDomNode
will break with concurrent mode. You'll see if you run this branch, the modal will close then open and then won't be able to close again. This double render is leveling up the issue in development. This is the exact functionality outlined here:https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage
Which happens with
StrictMode
on. If we remove or comment out strict mode, the bug where the modal closes and then re-opens goes away.I think the options are:
cc: @jbx-protocol/frontend-core - what do y'all think?
If the answer is wait 1, I can close this stack of PR's and re-open them once antd, hits v5.
If 2. I can start to look into using a modal, and also double check that other components aren't using the depricated
findDomNode
method.Additionally, I looked through antd's documentation for a destroy method or prop that would address this issue but it didn't exist.
More info:
The real tell is if you use the react dev tools, you'll see the modal
visibility
state isfalse
after closing, then the forced rerender opening of the modal.Screenshots or screen recordings
If applicable, provide screenshots or screen recordings to demonstrate the changes.
Acceptance checklist