New answers tagged

1

You asked about destructuring so I am going to review the destructuring bit only. Your after code looks fine. It's slighlty unconventional to destructure two separate things from a tuple you created. Instead, usually you see people do what @RoToRa suggested: destructuring in the function params first and then destructuring further in the function body. Here'...


1

Just one small suggestion regarding the deconstruction: You can deconstruct function parameters, so it could be written as: .map(({id, data}) => [id, data()]) .map(([id, { name, shelfName, photoURL }]) => ({ id, name, shelfName, photoURL }))


3

Super short review; Logging to console seems very primitive, consider a logging solution that handles different logging levels. { commit } is very bothering, why should a query function need to commit? Is it more a next function? Does it actually write and commit users? A comment would have been useful there. Actually, I am not sure why you restrict the ...


2

1. Is the code verbose? I would say it is a bit verbose. I first read over the methods to get data via XHR - e.g. users, posts, current user - and noted that they all have similar structure. I considered suggesting that there be one request to get all three types of data to reduce network traffic and allow simplifying the code, but I realize it is an ...


Top 50 recent answers are included