WhatsApp-Clone-Tutorial icon indicating copy to clipboard operation
WhatsApp-Clone-Tutorial copied to clipboard

[Server Step 5.1] - ordering of the chats in the top page is done server-side?

Open mdazy opened this issue 5 years ago • 0 comments

Hi,

The server-side code is OK but the reference to the client-side ChatsList component feels a bit weird.

// The chat will appear at the top of the ChatsList component

It implies that the service is making assumptions on the client-side usage and implementation, whereas it should really be the client relying on documented service API.

While it might make sense for the service to present its data in a (documented) particular order, it should not have to do so in order to achieve a specific result client-side, expecting it to display the data in the same order.

I'd rather expect server-side documentation that the chats are provided in a specific order, and client-side comments explaining that no reordering is necessary because the service API is designed that way, or explicit reordering client-side.

mdazy avatar Dec 03 '19 16:12 mdazy