Skip to content

Commit

Permalink
chore(clerk-js): Add virtual routing deprecation warning (#5072)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcarpenter authored Feb 5, 2025
1 parent 755ba24 commit 5c26eef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
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.');
}
return (
<AppearanceProvider
globalAppearance={props.globalAppearance}
Expand Down

0 comments on commit 5c26eef

Please sign in to comment.