diff --git a/src/hooks/useFundingFormState.tsx b/src/hooks/useFundingFormState.tsx index b94b562df..69732d6ff 100644 --- a/src/hooks/useFundingFormState.tsx +++ b/src/hooks/useFundingFormState.tsx @@ -63,14 +63,10 @@ export const useFundingFormState = ({ rewards }: UseFundStateProps) => { const [state, _setState] = useState(initialState) - const setTarget = useCallback( - (event: any) => { - const { name, value } = event.target - const newState = { ...state, [name]: value } - _setState(newState) - }, - [state], - ) + const setTarget = useCallback((event: any) => { + const { name, value } = event.target + _setState((current) => ({ ...current, [name]: value })) + }, []) const setState = useCallback((name: string, value: any) => { _setState((current) => ({ ...current, [name]: value }))