Added a note about needing document globally available
Added a note in ``10.4-test-utils.md` about needing window, document and document.createElement globally available before importing React.
Edvin Erikson committed
Sep 26, 2015 at 11:16 UTC
f9417a5da192035880740a44851085a782c52442
1 file changed
+5
docs/docs/10.4-test-utils.md
+5
@@ -49,6 +49,11 @@ ReactComponent renderIntoDocument(
49
50
Render a component into a detached DOM node in the document. **This function requires a DOM.**
51
52
+> Note:
53
+>
54
+> You will need to have `window`, `window.document` and `window.document.createElement`
55
+ globally available **before** you import React. Otherwise React will think it can't access the DOM and methods like `setState` won't work.
56
+
57
### mockComponent
58
59
```javascript