UNPKG

create-nova-expo-template

Version:

A template for creating a new React Native app using Expo and TypeScript, with a focus on performance and best practices.

13 lines (12 loc) 307 B
export default function debounce( func: (...args: any[]) => void, delay: number ) { let timeout: ReturnType<typeof setTimeout> | null = null; return (...args: any[]) => { if (timeout) clearTimeout(timeout); timeout = setTimeout(() => { func(...args); }, delay); }; }