Add docs for sign in and up using React#3107
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
597b7e7 to
8650c23
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
I made commits to remove the Claude settings (e44fad8) and fix the "incase" → "in case" typos (2d0e5c2). I tested the actual code examples and things look good there. 👍 The only thing I'm hung up on is: These are React guides, but we pull in React Router into both of them even though React Router has it's own SDK and guides. I don't know how I feel about that. Maybe @alexisintech can give us her opinion/guidance? |
There are specifically I could make a few changes to the PR to help clarify things:
Separate from the above, I can also expand the |
|
I've posted my docs review I've added a callout about how Clerk Docs is using React Router, but assuring users they can use whatever router they have and use our guides as a starting point. Added a QUIZ callout for "why is it necessary to move clerkprovider into its own component?" Got the guides updated with Core 3 changes. Added a "Protect content and read user data" guide for React Let me know what you think! @royanger |
|
just waiting on your feedback @royanger |
alexisintech
left a comment
There was a problem hiding this comment.
everything looks good to me!
|
|
||
| <Tabs items={["React Router", "No router"]}> | ||
| <Tab> | ||
| <Include src="_partials/react/react-router-callout" /> |
There was a problem hiding this comment.
Any reason this is a warning callout while the same info from above on line 11 is bold?
Also this and the warning from aboveare out of order, or the warning below could be redundant. This points to 'add a sign in or up page' which in turn points to 'add react router', so do we need both here?
I feel like if we keep both mentions, then maybe roll them into one, something like this:
| <Include src="_partials/react/react-router-callout" /> | |
| > [!Warning] | |
| > This example assumes you've added React Router to your application. If you haven't, see the [dedicated tutorial](https://clerk.com/docs/pr/roy-add-docs-for-react-sign-in-and-sign-up-pages/react/guides/development/declarative-mode). It also assumes you've set up the sign-in page by following the [custom sign-in-or-up page guide](/docs/react/guides/development/custom-sign-in-or-up-page) |
Also, I might be overthinking this but the two message/out of order aspect just jumped out at me when reviewing.
If a chance is made here the 'No router' warning would need an update too.
There was a problem hiding this comment.
the first callout, in the introduction section, is about setting up the sign-in-or-up page. this is for all users that are using this guide (they should set up their sign in page and then set up this sign up page).
the callout here about setting up react router, is only for users using react router - which is why its a separate callout, and its placed in the "react router" tab
There was a problem hiding this comment.
I totally get that. I was just saying that despite that, they feel out of order depending on what you're doing. And, as I admitted to, I might be overthinking it. My concern here is definitely non-blocking.
There was a problem hiding this comment.
This is the only 'unresolved' item (unresolved really just being if you wanted to change anything here or not). If you are good with this, I'm good with merging this PR.
Co-authored-by: Roy Anger <roy@royanger.com>
Co-authored-by: Michael Novotny <manovotny@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
🔎 Previews:
What does this solve? What changed?
During the work I realized that we currently have this guide to add
react-routerbut is for the@clerk/react-routerSDK and not@clerk/clerk-react. Changing to@clerk/clerk-reactdoesn't fully work. Without usingreasct-router'suseNavigate()hook and therouterPathandrouterReplaceprops the app reloads on navigation.To test this, please use the following branch. See lines 21-29 of
/src/main.tsxI wrote a new
@clerk/clerk-reactspecific guide to address this.Docs are missing a dedicated guide for adding a sign-in-or-up page and adding a sign-up page for Clerk+React.
react-routerTesting the 'no router' code
Testing the
react-routercode@clerk/clerk-reactwill have app reload/flickering issues with usinguseNavigate()Deadline
Other resources