SHARE
TWEET

Untitled

a guest Jan 24th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top