-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve Neon guide, highlighting API use in Next.js #1234
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for these suggestions!! We definitely need to market the use of Clerk more. I like the separation of the server action / UI section. I like that you removed the styling - that was a good find!
I've left other suggestions - and one overall suggestion is that we should use auth().userId
instead of currentUser().user.id
currentUser()
counts towards rate limiting and is better suited for retrieving the entire User
object. because we only need the user's ID in these examples, it'd be better to use auth().userId
- it won't count towards rate limiting and gives us exactly what we need.
docs/integrations/databases/neon.mdx
Outdated
1. Inside the `app/` directory, create a `db` folder. | ||
1. Inside the `db/` folder, create a `schema.ts` file and an `index.ts` file. | ||
1. Use the tabs below to find the example code for the schema and index files. | ||
To define the database schema and set up the database connection, create a `schema.ts` and a `index.ts` file in the `app/db` directory. In this example, `user_id` will be used to store the user's Clerk ID in the database. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason you're moving away from the numbered list?
Shaquil, our previous Docs team member who came from Vercel docs, implemented numbered lists to give broken-down, instructional steps. We have to tell users that they need to create a db
folder - they probably won't have one in their app already.
Let's try combining your suggestion with the numbered instructions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the instructions are short and intertwined enough to be condensed into a sentence.
The most important part to highlight is the use of user_id
to store the user ID. Since having a database file is very common, users will likely modify their existing schema rather than creating one from scratch.
However, if you prefer to keep the numbered list, I am more than happy to combine both suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's combine both suggestions and see how it looks - and then decide :~)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added in 5cc044c
Co-authored-by: Alexis Aguilar <[email protected]>
Co-authored-by: Alexis Aguilar <[email protected]>
I've included many of your suggestions, including using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amazing updates - thank you so much for contributing on this 😸💖
Important
🔎 Previews:
Explanation:
The current Neon guide, despite being written for Clerk, doesn't highlight the use of Clerk APIs within the demo app.
This PR:
classNames
for better readability