Dapatkan Objek Jendela di NextJS

componentDidMount() {
   console.log('window.innerHeight', window.innerHeight);
}

this not work in next js
Lonely Louse