Skip to content

saahithyan/my-input

Repository files navigation

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

About

An input component for react

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published