You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We call this approach “fetch-on-render” because it doesn’t start fetching until after the component has rendered on the screen. This leads to a problem known as a “waterfall”.
However, @gaearon has previously clarified out that componentDidMount only guarantees that the React tree has been mounted onto a DOM node, not that that DOM node is attached to the document/visible on screen: facebook/react#9117 (comment)
The componentDidMount would fire because the mounting has happened. However, as you can see, the div I’m mounting into is not actually part of the page’s DOM. Therefore, the component’s DOM node is also not in the document even though it has mounted into its container.
The text was updated successfully, but these errors were encountered:
In the "Approach 1" section:
However, @gaearon has previously clarified out that
componentDidMount
only guarantees that the React tree has been mounted onto a DOM node, not that that DOM node is attached to the document/visible on screen: facebook/react#9117 (comment)The text was updated successfully, but these errors were encountered: