javascript
javascript copied to clipboard
fix(nextjs): Improve support for cacheComponents
Description
Developers using cacheComponents in next v16, should position ClerkProvider further down the tree.
<html>
<body>
<ClerkProvider>
{children}
</ClerkProvider>
</body>
</html>
This PR also prevents keylessDriftDetection from firing as an action when the RSC variant is used.
Checklist
- [ ]
pnpm testruns as expected. - [ ]
pnpm buildruns as expected. - [ ] (If applicable) JSDoc comments have been added or updated for any package exports
- [ ] (If applicable) Documentation has been updated
Type of change
- [ ] 🐛 Bug fix
- [ ] 🌟 New feature
- [ ] 🔨 Breaking change
- [ ] 📖 Refactoring / dependency upgrade / documentation
- [ ] other:
Summary by CodeRabbit
-
New Features
- Added an option to disable keyless drift detection in the Clerk provider.
-
Improvements
- Better support for Next.js cache components with conditional suspense behavior.
- Drift detection is now lazily loaded to reduce startup work.
- Telemetry for keyless usage is now tracked per key to improve accuracy.