edink1E
Convex Communityโ€ข3y agoโ€ข
4 replies
edink1

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.
Learn about Convex's reactive database accessed through TypeScript cloud
1: The reactor | Convex Developer Hub
Was this page helpful?