Page name and routes convention
Answered
Spectacled bear posted this in #help-forum
Spectacled bearOP
Hi there, I'm working with next and I want to know which is the preferred or good practice naming convention?
showing table of users
/user
/users
showing table of entries
/entry
/entries
I know it doesn't really matter but still what is better to follow so that i can maintain consistency across projects.
showing table of users
/user
/users
showing table of entries
/entry
/entries
I know it doesn't really matter but still what is better to follow so that i can maintain consistency across projects.
4 Replies
Asian black bear
Resources in REST are named using plural terms
Answer
Asian black bear
Reason being that
/users/[id]
when referencing one item makes more sense.Spectacled bearOP
Yeah for api routes it make sense to go for
plural
but here i'm asking for ui based routes, should I open the page at /entries
or /entry
Asian black bear
I see no difference between the frontend which represents API responses and API endpoint conventions 🤷♂️