localstorage.removeitem not working react code example Example: localstorage clear item localStorage.removeItem(key);