Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 925 Bytes

README.md

File metadata and controls

47 lines (33 loc) · 925 Bytes

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