Skip to content

Fixes several react warnings#10869

Merged
nixocio merged 1 commit into
ansible:develfrom
AlexSCorey:10822-fixReactWarnings
Aug 12, 2021
Merged

Fixes several react warnings#10869
nixocio merged 1 commit into
ansible:develfrom
AlexSCorey:10822-fixReactWarnings

Conversation

@AlexSCorey

@AlexSCorey AlexSCorey commented Aug 12, 2021

Copy link
Copy Markdown
Member
SUMMARY

This addresses part of #10822. There is still a warning to be addressed when logging out. Interestingly I was only able to get these warnings to appear using FireFox. They did not appear on Chrome, though the findDomNode warning did.

Warning: Cannot update a component (`SessionProvider`) while rendering a different component (`ProtectedRoute`). To locate the bad setState() call inside `ProtectedRoute`, follow the stack trace as described in https://fb.me/setstate-in-render
    in ProtectedRoute (at App.js:166)
    in Switch (at App.js:156)
    in SessionProvider (at App.js:155)
    in Unknown (at App.js:154)
    in I18nProvider (at App.js:153)
    in App (at App.js:180)
    in Router (created by HashRouter)
    in HashRouter (at App.js:179)
    in Unknown (at src/index.js:10)
    in StrictMode (at src/index.js:9)

This warning is associated with a Patternfly component is

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of FindRefWrapper which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node
    in div (created by PageHeaderToolsItem)
    in PageHeaderToolsItem (at PageHeaderToolbar.js:84)
    in FindRefWrapper (created by Popper)
    in Popper (created by Tooltip)
    in Tooltip (at PageHeaderToolbar.js:83)
    in div (created by PageHeaderToolsGroup)
    in PageHeaderToolsGroup (at PageHeaderToolbar.js:82)
    in div (created by PageHeaderTools)
    in PageHeaderTools (at PageHeaderToolbar.js:81)
    in PageHeaderToolbar (at AppContainer.js:63)

issue filed here patternfly/patternfly-react#6050

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • UI
AWX VERSION
ADDITIONAL INFORMATION

@AlexSCorey AlexSCorey changed the title fixes several react warnings Fixes several react warnings Aug 12, 2021
@nixocio nixocio merged commit 6a9de16 into ansible:devel Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants