Semantic snippet search

Find code you've seen before — by describing it.

Snippet is a personal snippet library powered by embeddings. Search by meaning, not keywords — even when you forgot what you named the file.

Semantic searchAI metadataPublic pages⌘K palette
Semantic

useDebouncedValue

Defer a changing value until typing stops for N ms.

94% match
const useDebouncedValue = <T,>(value: T, delay = 300) => {
  const [debounced, setDebounced] = useState(value);
  useEffect(() => {
    const id = setTimeout(() => setDebounced(value), delay);
    return () => clearTimeout(id);
  }, [value, delay]);
  return debounced;
};
TypeScript#hooks #performance