useDynamicList
A hook that helps you manage dynamic list and generate unique key for each item.
Overview
A hook that helps you manage dynamic list and generate unique key for each item.
Installation
Open inpnpm dlx shadcn@latest add https://shadcn-ahooks.vercel.app/r/useDynamicList.jsonnpx shadcn@latest add https://shadcn-ahooks.vercel.app/r/useDynamicList.jsonyarn shadcn@latest add https://shadcn-ahooks.vercel.app/r/useDynamicList.jsonbun shadcn@latest add https://shadcn-ahooks.vercel.app/r/useDynamicList.jsonA hook that helps you manage dynamic list and generate unique key for each item.
Examples
Basic usage
Using with antd Form
Another way of writing used in antd Form
Draggable dynamic table
API
const result: Result = useDynamicList(initialValue: T[]);Result
| Property | Description | Type | Remarks |
| - | -- | - |
| initialValue | Initial value of the list | T[] | [] |