daisyui / react-daisyui

daisyUI components built with React 🌼
http://react.daisyui.com/
MIT License
886 stars 98 forks source link

Feat: Debounce option for `Input` component #441

Closed exoRift closed 6 months ago

exoRift commented 6 months ago

Add an optional arg for the input component that debounces

benjitrosch commented 6 months ago

@exoRift I'm afraid this would go against one of the goals of the library which is to add a pretty close-to-native-HTML and un-opinionated React wrapper, and leave any specific logic/implementations up to the developer.

If you want to create your own generic debounce hook for React, this result from a Google search looks similar to just about every codebase I've worked in: https://www.dawsoncodes.com/posts/9/using-usedebounce-hook-with-react