DEV Community

Discussion on: Custom React Hooks: useArray

 
iamludal profile image
Ludal 🚀

Okay now I see the benefits, and I totally agree with you! Never had to deal with such complex examples though, but it's great to have this library in mind. 🙌

Thread Thread
 
ericbdev profile image
Eric

But I can see this saving time again and again just due to its simplified mental model.

Writing nested spread after nested spread gets a little complicated after a while. Now I'm so far down the pattern that when I see syntax looking like it's mutating a variable out of scope I balk a little. All the same, it would be a nice tool.

Thread Thread
 
op profile image
op

Yeah, it definitely feels dirty writing it that way at first but it's a small price to pay for getting away from some nested spread abominations.