Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 877 Bytes

README.md

File metadata and controls

42 lines (29 loc) · 877 Bytes

@lokibai/react-input

input with compositionStart,compositionUpdate,compositionEnd for ime like Chinese input

See facebook/react#3926

NPM

Install

npm install --save @lokibai/react-input

Usage

import React from 'react';
import { Input Textarea } from '@lokibai/react-input';

const MyInput = () => {
  const [value, setValue] = React.useState('');
  const onChange = value => {
    setValue(value);
  };

  return <Input value={value} onChange={onChange} />;
};

const MyTextarea = () => {
  const [value, setValue] = React.useState('');
  const onChange = value => {
    setValue(value);
  };

  return <Textarea value={value} onChange={onChange} />;
};

License

MIT ©