@dedalik/use-react
v1.0.5
Published
Collection of React Hook Utilities
Downloads
4
Maintainers
Readme
Features
- Engaging Documentation & Live Demos
- React Support: Compatible with React.js 17 and above
- Robust Typing: Crafted in TypeScript with comprehensive TS Docs
- Server-Side Rendering (SSR) Compatible
- Adaptable: Customizable event filters and targets for various needs
Usage
import React from 'react'
import { useTextareaAutoSize } from '@dedalik/use-react'
const TextareaAutoSize: React.FC = () => {
const [text, setText] = useState('')
const { textareaRef } = useTextareaAutoSize({ input: text })
const handleChange = (event: ChangeEvent<HTMLTextAreaElement>) => {
const newValue = event.target.value
setText(newValue)
}
return <textarea ref={textareaRef} value={text} onChange={handleChange} style={{ resize: 'none' }} />
}
export default TextareaAutoSize
Refer to functions list or documentations for more details.
Install
npm i @dedalik/use-react
Thanks
This project is heavily inspired by the following awesome projects.
📄 License
MIT License © 2023-PRESENT dedalik