0.1.1 • Published 4 years ago

@lokibai/react-input v0.1.1

Weekly downloads
10
License
MIT
Repository
github
Last release
4 years ago

@lokibai/react-input

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

See https://github.com/facebook/react/issues/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 ©