chore(release): v2.24.0 - #1198
Conversation
📝 WalkthroughWalkthroughThe release version changed to 2.24.0. Generated documentation now includes ChangesVersion 2.24.0 documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/functions/useAuth0Suspense.html`:
- Around line 18-24: Update the useAuth0Suspense documentation example to
include an Auth0Provider surrounding the Suspense and Profile components, or
state that an existing provider is required immediately before the example.
Apply the change in the source documentation for useAuth0Suspense and regenerate
the corresponding HTML output so both remain consistent.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f75d9b54-1e55-4517-bdbe-862e61949f03
⛔ Files ignored due to path filters (2)
CHANGELOG.mdis excluded by!CHANGELOG.mdpackage-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (56)
.versiondocs/assets/hierarchy.jsdocs/assets/navigation.jsdocs/assets/search.jsdocs/classes/AuthenticationError.htmldocs/classes/ConnectError.htmldocs/classes/GenericError.htmldocs/classes/InvalidConfigurationError.htmldocs/classes/MfaChallengeError.htmldocs/classes/MfaEnrollmentError.htmldocs/classes/MfaEnrollmentFactorsError.htmldocs/classes/MfaError.htmldocs/classes/MfaListAuthenticatorsError.htmldocs/classes/MfaRequiredError.htmldocs/classes/MfaVerifyError.htmldocs/classes/MissingRefreshTokenError.htmldocs/classes/MissingScopesError.htmldocs/classes/MyAccountApiError.htmldocs/classes/OAuthError.htmldocs/classes/PasskeyChallengeError.htmldocs/classes/PasskeyError.htmldocs/classes/PasskeyGetTokenError.htmldocs/classes/PasskeyRegisterError.htmldocs/classes/PopupCancelledError.htmldocs/classes/PopupOpenError.htmldocs/classes/PopupTimeoutError.htmldocs/classes/TimeoutError.htmldocs/classes/UseDpopNonceError.htmldocs/functions/Auth0Provider.htmldocs/functions/useAuth0.htmldocs/functions/useAuth0Suspense.htmldocs/functions/withAuth0.htmldocs/functions/withAuthenticationRequired.htmldocs/hierarchy.htmldocs/index.htmldocs/interfaces/Auth0ContextInterface.htmldocs/interfaces/EnrollEmailParams.htmldocs/interfaces/EnrollOtpParams.htmldocs/interfaces/EnrollPushParams.htmldocs/interfaces/EnrollSmsParams.htmldocs/interfaces/EnrollVoiceParams.htmldocs/interfaces/GetTokenWithPopupOptions.htmldocs/interfaces/LogoutOptions.htmldocs/interfaces/PopupLoginOptions.htmldocs/interfaces/RedirectLoginOptions.htmldocs/interfaces/WithAuth0Props.htmldocs/interfaces/WithAuthenticationRequiredOptions.htmldocs/modules.htmldocs/types/AppState.htmldocs/types/Auth0ProviderOptions.htmldocs/types/Auth0ProviderWithClientOptions.htmldocs/types/Auth0ProviderWithConfigOptions.htmldocs/types/Auth0SuspenseContextInterface.htmldocs/types/ConnectedAccount.htmldocs/variables/Auth0Context.htmlpackage.json
| <div class="tsd-comment tsd-typography"><pre><code class="jsx"><span class="hl-8"><</span><span class="hl-9">Suspense</span><span class="hl-1"> </span><span class="hl-10">fallback</span><span class="hl-1">=</span><span class="hl-6">{</span><span class="hl-8"><</span><span class="hl-9">Spinner</span><span class="hl-11"> </span><span class="hl-8">/></span><span class="hl-6">}</span><span class="hl-8">></span><br/><span class="hl-1"> </span><span class="hl-8"><</span><span class="hl-9">Profile</span><span class="hl-1"> </span><span class="hl-8">/></span><br/><span class="hl-8"></</span><span class="hl-9">Suspense</span><span class="hl-8">></span><br/><br/><span class="hl-6">function</span><span class="hl-1"> </span><span class="hl-0">Profile</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> { </span><span class="hl-7">user</span><span class="hl-1">, </span><span class="hl-7">isAuthenticated</span><span class="hl-1"> } = </span><span class="hl-0">useAuth0Suspense</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-4">return</span><span class="hl-1"> </span><span class="hl-5">isAuthenticated</span><span class="hl-1"> ? </span><span class="hl-8"><</span><span class="hl-12">p</span><span class="hl-8">></span><span class="hl-1">Hello </span><span class="hl-6">{</span><span class="hl-5">user</span><span class="hl-11">.</span><span class="hl-5">name</span><span class="hl-6">}</span><span class="hl-8"></</span><span class="hl-12">p</span><span class="hl-8">></span><span class="hl-1"> : </span><span class="hl-8"><</span><span class="hl-12">p</span><span class="hl-8">></span><span class="hl-1">Please log in</span><span class="hl-8"></</span><span class="hl-12">p</span><span class="hl-8">></span><span class="hl-1">;</span><br/><span class="hl-1">}</span> | ||
| </code><button type="button">Copy</button></pre> | ||
|
|
||
| <p>Suspense-enabled variant of <code>useAuth0</code>. Suspends the component until Auth0 | ||
| initialization completes (letting the nearest <code><Suspense></code> fallback render), | ||
| and throws initialization errors so the nearest Error Boundary can handle | ||
| them. Requires React 19 or later.</p> |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Show the required Auth0Provider in the example.
useAuth0Suspense throws when ctx._initPromise is absent. The supplied implementation in src/use-auth0-suspense.tsx, Lines 41-69, requires an <Auth0Provider>, but this sample shows only <Suspense>. A reader who copies the sample without an existing provider receives a runtime error. Add the provider prerequisite to the sample or state it immediately before the sample. Update the source documentation and regenerate this HTML file.
Source contract: src/use-auth0-suspense.tsx, Lines 41-69.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/functions/useAuth0Suspense.html` around lines 18 - 24, Update the
useAuth0Suspense documentation example to include an Auth0Provider surrounding
the Suspense and Profile components, or state that an existing provider is
required immediately before the example. Apply the change in the source
documentation for useAuth0Suspense and regenerate the corresponding HTML output
so both remain consistent.
Added
Summary by CodeRabbit
New Features
useAuth0Suspenseand its suspense context type, including usage guidance and React 19 requirements.Documentation
Chores