Debounce. Wait for the user to stop editing, then save. This avoids saving on every keystroke. 1000ms is a good delay (save 1 second after the last edit).
Should you debounce or throttle auto-save?
More FAQs in Debounce vs Throttle: Real-World Use Cases
Search input (300ms, wait for typing to stop), auto-save (1000ms, wait for editing to stop), window resize (250ms, wait for resizing to stop), and form validation (500ms, wait for input to stop).
Scroll (100ms, update position at a controlled rate), mousemove (50ms, track cursor at a controlled rate), and button click (500ms, prevent rapid double-clicks).
Debounce. Wait for the user to stop typing, then make the API call. This avoids calling the API on every keystroke. 300ms is a good delay.
Still have questions?
Browse all our FAQs or reach out to our support team
Want to upskill yourself?
Your learning library
Small steps. Big possibilities.
Find your next course. Build something great.