For instance React's componentWillMount():
This is the only lifecycle hook called on server rendering. Generally, we recommend using the
constructor()
instead.
And in React's componentDidMount()
componentDidMount()
is invoked immediately after a component is mounted. Initialization that requires DOM nodes should go here.
However I do not see anything in the Angular doc specifying which ones are executed on the server and which ones are executed on the browser (or both). Or should I assume that all of them are executed on both? If so, how do you do things that require the DOM (window, document, etc.)?