Guest User

Untitled

a guest
Jan 24th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import React, { FunctionComponent } from 'react';
  2. import useFormInput from './useFormInput';
  3.  
  4. const AlertInput: FunctionComponent = () => {
  5. const ALERT_TEXT = 'hallo';
  6. const input = useFormInput('', (e: string) => e === ALERT_TEXT && alert(e));
  7.  
  8. return <input {...input} />;
  9. };
  10.  
  11. export default AlertInput;
Add Comment
Please, Sign In to add comment