Skip to content

Instantly share code, notes, and snippets.

Uzbek Developer

Sheralijon turdiyev

Uzbek Developer
View GitHub Profile
View use-local-storage-example.js
import { useState, useEffect } from 'react';
// Usage
function App() {
// Similar to useState but we pass in a key to value in local storage
// With useState: const [name, setName] = useState('Bob');
const [name, setName] = useLocalStorage('name', 'Bob');
return (
You can’t perform that action at this time.