What is the purpose of having functions like componentWillMount in React.js?
I have been writing components in React.js recently. I have never had to use methods like componentWillMount and componentDidMount . render is indispensable. getInitialState and other helper methods I wrote also come in handy. But not the two aforementioned lifecycle methods. My current guess is that they are used for debugging? I can console.log out inside them: componentWillMount: function() { console.log('component currently mounting'); }, componentDidMount: function() { console.log('component has mounted'); } Are there any other uses? componentDidMount is useful if you want to use some non