mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #4980 from edvinerikson/add-window-document-note
Added a note about needing document globally available
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user