Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { FunctionComponent } from 'react';
- import useFormInput from './useFormInput';
- const AlertInput: FunctionComponent = () => {
- const ALERT_TEXT = 'hallo';
- const input = useFormInput('', (e: string) => e === ALERT_TEXT && alert(e));
- return <input {...input} />;
- };
- export default AlertInput;
Add Comment
Please, Sign In to add comment