Bytes

Micro-updates, code snippets, and transient thoughts that don't quite fit into a full article. A digital scratchpad.

useDebounce.ts
Snippet • Oct 24

Debounce Hook

```typescript
const useDebounce = <T>(value: T, delay: number): T => {
  const [debouncedValue, setDebouncedValue] = useState<T>(value);

  useEffect(() => {
    const handler = setTimeout(() => {
      setDebouncedValue(value);
    }, delay);

    return () => clearTimeout(handler);
  }, [value, delay]);

  return debouncedValue;
};
```
thought.txt
Thought • Oct 22

// We spend too much time arguing about the perfect architecture before we even know the actual shape of the problem. Sometimes the best architecture is the one that lets you rewrite it easily once you finally understand the requirements.

oklch.url
Discovery • Oct 20

Oklch Color Picker

Incredible tool for building perceptually uniform color palettes. Been using this extensively for the new Acorn-inspired theme updates.

DesignTools
devlog.md
$ git checkout -b next14-migration Switched to a new branch 'next14-migration' $ npm run build vite v6.2.3 building for production... ✓ 412 modules transformed. dist/server.js 84.12 kB dist/client/ 2.41 MB
Devlog • Oct 18

Migrating to Next 14

Server actions are finally feeling stable enough for production use. Ripping out tRPC in favor of native actions reduced the bundle size by almost 15%. The developer experience is vastly simpler, though handling loading states requires a slight mental shift.

"Good design is obvious. Great design is transparent."
Joe Sparano
styles.css
Snippet • Oct 12

Hide Scrollbar Utility CSS

```css
/* Acorn standard scrollbar removal */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none;    /* Firefox */
}
```