JSFiddle - React, Tailwind, and code Playground

by DaMaus

JavaScript

if ('localStorage' in window && window.localStorage !== null) {
    alert('can use');
}else{
    alert('cannot use');
}