@cizar/react-unique-id
v0.1.2
Published
Minimal Unique ID generator for React Components
Downloads
4
Readme
react-unique-id
Installation
npm install @cizar/react-unique-id --save-dev
Usage
import React from 'react'
import uniqueId from '@cizar/react-unique-id'
const Input = ({ id, label, name, type, value, onChange }) => (
<div>
<label htmlFor={id}>{label}</label>
<input id={id} type={type} value={value} onChange={onChange} />
</div>
)
export default uniqueId(Input)