@lokibai/react-input
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@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 ©

/@lokibai/react-input/

    Package Sidebar

    Install

    npm i @lokibai/react-input

    Weekly Downloads

    5

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    16.4 kB

    Total Files

    15

    Last publish

    Collaborators

    • lokibai