Closed DNiederweis closed 2 years ago
Thanks. This is legacy code that should be not be used, but is still here for backwards support.
Congrats on merging your first pull request to Design System React! :tada:
If you have a moment, please fill out this five question survey, we would appreciate it.
On behalf of Salesforce's customers, partners, product specialists and employees, we would like offer sincere thanks and appreciation for helping make our user experience better. We look forward to working with you more in the future.
This definitely calls for a high five!
Fixes # Deprecation warning in console for
findDOMNode
in StrictMode.Additional description
findDOMNode
is deprecated in StrictMode as it "breaks abstraction levels" and "creates a refactoring hazard" - React Documentation. The React documentation instead encourages the use of references.This pull request follows this advice and creates a self-reference in the constructor(
selfRef
). This reference is then used incomponentDidUpdate
when it is checked whether the modal is closing. If it is, then instead of usingfindDOMNode
to get a reference to the modal and using that for unmounting and removing from the DOM, it instead uses theselfRef
now.CONTRIBUTOR checklist (do not remove)
Please complete for every pull request
npm run lint:fix
has been run and linting passes.components/component-docs.json
CI tests pass (npm test
).REVIEWER checklist (do not remove)
components/component-docs.json
tests.Required only if there are markup / UX changes
last-slds-markup-review
inpackage.json
and push.last-accessibility-review
, topackage.json
and push.npm run local-update
within locally cloned site repo to confirm the site will function correctly at the next release.