import React, { useEffect } from 'react'; import { Icon, Input } from 'UI'; import { debounce } from 'App/utils'; let debounceUpdate: any = () => {} interface Props { onChange: (value: string) => void; } function AuditSearchField(props: Props) { const { onChange } = props; useEffect(() => { debounceUpdate = debounce((value) => onChange(value), 500); }, []) const write = ({ target: { name, value } }) => { debounceUpdate(value); } return (