01. Curated Features

_

_

REFERENCE ID 140
useLocalStorage.ts
function useLocalStorage<T>(key: string, initialValue: T) {
// State to store our value
const [storedValue, setStoredValue] = useState<T>(() => {
try {
const item = window.localStorage.getItem(key);
return item ? JSON.parse(item) : initialValue;
} catch (error) {
console.log(error);
return initialValue;
}
});
return [storedValue, setStoredValue] as const;
}

_

_

JD
@jason_dev
18 Apr, 10:32 AM

Just implemented the new RSC strategy from Ravi's latest log. Performance gains are incredible. 🚀

242
25
AD
@alex_dev
19 Apr, 12:45 PM

Contributed a new snippet for Type-safe form validation to the community library. Check the PR!

PR #1024 - feat(forms): add zod-hook
MK
@m_keller
20 Apr, 09:15 AM

"The TypeScript Roadmap PDF is exactly what I needed to bridge the gap as a visual designer. Highly recommend."