You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SDK-813] Remix: Provide Non-Root Implementation #1844
This issue is not a question, general help request, or anything other than a feature request directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Description
The current documentation encourages the user to create a root loader and wrap the main App with ClerkApp however this is not an efficient implementation for a few reasons:
There is no way to avoid making a call to the ClerkAPI every request, if some routes are unauthenticated, it is wasted latency.
Any use of getAuth() in a loader will cause additional requests as there is no request-level cache (eg: storing promise on the remix context, keeping in mind that loaders execute in parallel).
Rather than only offer ClerkApp as a solution, encourage the user use ClerkProvider directly and provide a getClerkState() call that returns valid types for TS.
Activity
[-]Remix: Provide Non-Root Implementation[/-][+][SDK-813] Remix: Provide Non-Root Implementation[/+]