edink1
CCConvex Community
•Created by edink1 on 8/12/2023 in #support-community
Convex chat docs potential small correction
Hello 👋,
I was going through the
Convex Chat
tutorial and when I got to the first exercise (https://docs.convex.dev/tutorial/reactor#find--fix-the-query-bug), I was surprised to see that the solution was to just use the JS .reverse
function. Wouldn't it be "better" to just change the order of the messages from desc
to asc
instead?
So from
const messages = await ctx.db.query("messages").order("desc").take(100);
to
const messages = await ctx.db.query("messages").order("asc").take(100);
Apologies if this is too nitpicky of a question.5 replies