mirador icon indicating copy to clipboard operation
mirador copied to clipboard

Maintenance: fix findDOMNode and defaultProps console warnings

Open marlo-longley opened this issue 1 year ago • 2 comments

There are a ton of these cluttering the console.

Warning: Connect(WithPlugins(Window)): Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.

and

 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

marlo-longley avatar Oct 29 '24 15:10 marlo-longley

defaultProps problem components:

  • [ ] PluginProvider
  • [ ] MiradorMenuButton
  • [x] MosaicRenderPreview https://github.com/ProjectMirador/mirador/pull/3960
  • [ ] BackgroundPluginArea https://github.com/ProjectMirador/mirador/pull/3955
  • [ ] LazyLoadedImage https://github.com/ProjectMirador/mirador/pull/3957

marlo-longley avatar Oct 29 '24 21:10 marlo-longley

I think we'll want https://github.com/ProjectMirador/mirador/pull/3958 too.

jcoyne avatar Oct 30 '24 01:10 jcoyne