Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/friendly-ears-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Add virtual routing deprecation warning.
4 changes: 4 additions & 0 deletions packages/clerk-js/src/ui/lazyModules/providers.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { deprecated } from '@clerk/shared/deprecated';
import type { Appearance } from '@clerk/types';
import React, { lazy, Suspense } from 'react';

Expand Down Expand Up @@ -56,6 +57,9 @@ type LazyComponentRendererProps = React.PropsWithChildren<
type PortalProps = Parameters<typeof Portal>[0];

export const LazyComponentRenderer = (props: LazyComponentRendererProps) => {
if (props.componentProps.routing === 'virtual') {
deprecated('routing="virtual"', 'Use routing="hash" instead.');
}
Comment on lines +60 to +62
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asking for confirmation here, since this is only logged in LazyComponentRenderer, it means that SignInModal will not display the deprecation, but if someone does <SignIn routing="virtual" /> then it will.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my testing, that is correct.

return (
<AppearanceProvider
globalAppearance={props.globalAppearance}
Expand Down