(atIndex: number, withItem: T)
| 16 | } |
| 17 | |
| 18 | function replace(atIndex: number, withItem: T) { |
| 19 | setValue((prev) => { |
| 20 | let updated = [...prev]; |
| 21 | updated[atIndex] = withItem; |
| 22 | return updated; |
| 23 | }); |
| 24 | } |
| 25 | |
| 26 | return { value, add, remove, edit, replace }; |
| 27 | } |
nothing calls this directly
no outgoing calls
no test coverage detected