diff --git a/awx/ui/src/components/AppendBody/AppendBody.js b/awx/ui/src/components/AppendBody/AppendBody.js index f7317187b1..9f3ca64d06 100644 --- a/awx/ui/src/components/AppendBody/AppendBody.js +++ b/awx/ui/src/components/AppendBody/AppendBody.js @@ -1,8 +1,8 @@ -import { useEffect } from 'react'; +import { useEffect, useState } from 'react'; import ReactDOM from 'react-dom'; function AppendBody({ children }) { - const el = document.createElement('div'); + const [el] = useState(document.createElement('div')); useEffect(() => { document.body.appendChild(el);