Use this function to delete a value from localStorage.
example
const user = { name: 'John', email: 'John@fakemail.com' };
// Add a user to your localStorage
writeStorage('user', JSON.stringify(user));
// This will also trigger an update to the state of your component
deleteFromStorage('user');
export
Parameters
key: string
The key of the item you wish to delete from localStorage.
Use this function to delete a value from localStorage.
const user = { name: 'John', email: 'John@fakemail.com' }; // Add a user to your localStorage writeStorage('user', JSON.stringify(user)); // This will also trigger an update to the state of your component deleteFromStorage('user');