Skip to content

[SDK-813] Remix: Provide Non-Root Implementation #1844

Description

@parisholley

Preliminary Checks

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:

  1. There is no way to avoid making a call to the ClerkAPI every request, if some routes are unauthenticated, it is wasted latency.
  2. 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.

Affected Packages

@clerk/remix

SDK-813

Activity

  1. changed the title [-]Remix: Provide Non-Root Implementation[/-] [+][SDK-813] Remix: Provide Non-Root Implementation[/+] on Oct 16, 2023
  2. locked and limited conversation to collaborators on Oct 30, 2023
  3. converted this issue into a discussion #1963 on Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions