We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 558983d commit d147e7bCopy full SHA for d147e7b
src/core-react.ts
@@ -120,11 +120,11 @@ export function useForceUpdate() {
120
121
export function useUniqueId() {
122
if (SSR_SUPPORT_ENABLED) {
123
- if (React.version.startsWith("18")) {
+ if (React.version.startsWith("18") && typeof (React as any)["useId"] !== "undefined") {
124
return `s${(React as any)["useId"]().replace(/\:/g, "")}`;
125
}
126
127
- if ((React as any)["unstable_useOpaqueIdentifier"]) {
+ if (typeof (React as any)["unstable_useOpaqueIdentifier"] !== "undefined") {
128
return `s${(React as any)["unstable_useOpaqueIdentifier"]().replace(/\:/g, "")}`;
129
130
0 commit comments