my-input-react

0.1.5 • Public • Published

my-input

A input component for react

NPM JavaScript Style Guide

Install

npm install --save my-input

Usage

import React, { Component } from 'react'
import MyInput from 'my-input-react'

class App extends Component {
    state = {
        value: '' // initial value
    }

    handleInput (refer, value) {
        this.setState({ value })
    }

    render () {
        const { value } = this.state

        return (
            <MyInput
                value={value}
                refer='myInput'
                placeHolder='Enter something'
                handler={this.handleInput.bind(this)}/>
        )
    }
}

export default App

License

MIT © saahithyan

/my-input-react/

    Package Sidebar

    Install

    npm i my-input-react

    Weekly Downloads

    0

    Version

    0.1.5

    License

    MIT

    Unpacked Size

    7.44 kB

    Total Files

    7

    Last publish

    Collaborators

    • saahithyan