-
|
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: 2 comments 1 reply
-
|
@jsoneaday when you call In this case, |
Beta Was this translation helpful? Give feedback.
-
|
It's not ideal. But i don't care about appElement during the unit tests. |
Beta Was this translation helpful? Give feedback.

@jsoneaday when you call
setAppElementbefore therenderthe#rootelement is not available yet.In this case,
appElement={el}will be recommended, or, you will need to prepare thedocument.bodyto have the correct elements, before rendering.