-
When I run my Modal component inside of a testing-library test, which uses react-modal internally, I get this Warning: react-modal: App element is not defined. Please use
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@jsoneaday when you call In this case, |
Beta Was this translation helpful? Give feedback.
@jsoneaday when you call
setAppElement
before therender
the#root
element is not available yet.In this case,
appElement={el}
will be recommended, or, you will need to prepare thedocument.body
to have the correct elements, before rendering.