Warning: findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node
Basically need to destructure the props and assign defaults to those passed in destructured props and remove the defaultProps from the code and the error in the console will go away.
In the next major React version release
findDOMNode
is going to be depreciated. The documentation recommends usingcreateRef
instead.https://react.dev/reference/react-dom/findDOMNode#alternatives
Warning in the DEV console:
Warning: findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node
The places that are using
findDOMNode
:Look to replace the
findDOMNode
or ignore the warning as the prop is being used in old test files.In the next major React version release support for
defaultProps
for Inputs will no longer be supported.Warning in the DEV console:
InputSubmit: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
Good video to follow to make this change: https://www.youtube.com/watch?v=fnQusZt49_Y
Basically need to destructure the props and assign defaults to those passed in destructured props and remove the
defaultProps
from the code and the error in the console will go away.The places that are using
defaultProps
: