Uzyskaj obiekt okna w NextJS

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

this not work in next js
Lonely Louse