0

I'm looking for some accommodating a large 3rd-party software for a 1st-party concern.

I have a Popover,
With 3rd-party GUI that is along the window's right-side,
That throws Warning: findDOMNode is deprecated in StrictMode.
I'd fix it if I could.

Normally, the Popover opening accommodates the window-view,
But this Popover extends past the right-side.
But-the-but, when I resize the window then the Popover fits itself back inside.
What is going on here?

Because, I can't figure out how to: window.location.reload() or id.hide().show() without wiping the React.Function.Component.
Which the Popover needs because I've been told that React.Class.Component doesn't work with React-Hooks.

Again - what is going on here? So I can fix it.

Zach
  • 539
  • 1
  • 4
  • 22
  • my guts feeling is that you need give some time. for UI to reflect, don't know if this helps, https://kentcdodds.com/blog/useeffect-vs-uselayouteffect – windmaomao May 26 '20 at 21:03

1 Answers1

0

So I think I know what's going on now.

The 3rd-party's React component isn't loaded yet until the Functional Popover Component presents it. This causes the findDOMNode warning to trigger because this component isn't hydrated on-the-reference yet and because the Popover is a Functional Component which does not work with findDomNode.

But, the real reason the React component falls-outside-the-window seems caused by placement before React hydration. And as I understand it, the 3rd-party component is server-side rendered which is why it has to be hydrated by them.

Thanks everyone for looking at this.

Zach
  • 539
  • 1
  • 4
  • 22