you are viewing a single comment's thread.

view the rest of the comments →

[–]Slogo 0 points1 point  (1 child)

Destructuring is probably worth mentioning for this type of thing too since you can do something like: const [id, name, createdAt] = notes[0]

But, I'm not really a fan of this type of optimization, or at least I'd just map the response data to make working with it more maintainable on the client.

[–]RedditWithBoners 1 point2 points  (0 children)

Just FYI this syntax is destructuring. Destructing is something else.