Obtenez un objet de fenêtre dans NextJS

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

this not work in next js
Lonely Louse