{}Snippt
ExploreTags
New

Tags

Browse snippets grouped by topic.

react3utils3hooks2typescript2bash1database1go1http1linux1python1sql1

#react

Debounced search input

@maya_dev·13h ago

TSX
function SearchBox({ onSearch }: { onSearch: (q: string) => void }) {
    const [value, setValue] = useState('')
    const debounced = useDebounce(value, 250)
20301#hooks #react

Tailwind cn() class merger

@maya_dev·3d ago

TypeScript
import { clsx, type ClassValue } from 'clsx'
import { twMerge } from 'tailwind-merge'

// Merge conditional class names and resolve Tailwind conflicts.
12800#react #typescript #utils

useDebounce hook

@maya_dev·5d ago

TypeScript
import { useState, useEffect } from 'react'

export function useDebounce<T>(value: T, delay = 300): T {
    const [debounced, setDebounced] = useState(value)
34221#hooks #react #typescript
{}SnipptShare code, instantly.
ExploreTagsNew snippetSearch