Question : Local Storage is undefined
Answered by : strange-starling-vnnhv6kxz6am
if (typeof window !== 'undefined') { console.log('we are running on the client')
} else { console.log('we are running on the server');
}
Source : https://stackoverflow.com/questions/52474208/react-localstorage-is-not-defined-error-showing | Last Update : Mon, 16 Nov 20