What's wrong with my code? I don't see the scroll happening, no error. Perhaps props came after the scroll happens?
class MsgPanel extends Component {
componentDidMount() {
window.scrollTo(0, 0) // won't work
}
render() {
return(
<div>
{this.props.something}
</div>
)
}
}