Merge pull request #4980 from edvinerikson/add-window-document-note

Added a note about needing document globally available
This commit is contained in:
Paul O’Shannessy
2015-09-30 11:08:29 -07:00
+5
View File
@@ -49,6 +49,11 @@ ReactComponent renderIntoDocument(
Render a component into a detached DOM node in the document. **This function requires a DOM.**
> Note:
>
> You will need to have `window`, `window.document` and `window.document.createElement`
globally available **before** you import React. Otherwise React will think it can't access the DOM and methods like `setState` won't work.
### mockComponent
```javascript