Skip to content

Commit 734ce44

Browse files
committed
Attempt to remove import error
1 parent 09146d2 commit 734ce44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core-react.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ export function useForceUpdate() {
121121
export function useUniqueId() {
122122
if (SSR_SUPPORT_ENABLED) {
123123
if (React.version.startsWith("18")) {
124-
return `s${React.useId().replace(/\:/g, "")}`;
124+
return `s${(React as any)["useId"]().replace(/\:/g, "")}`;
125125
}
126126

127-
if ((React as any).unstable_useOpaqueIdentifier) {
128-
return `s${(React as any).unstable_useOpaqueIdentifier().replace(/\:/g, "")}`;
127+
if ((React as any)["unstable_useOpaqueIdentifier"]) {
128+
return `s${(React as any)["unstable_useOpaqueIdentifier"]().replace(/\:/g, "")}`;
129129
}
130130
}
131131

0 commit comments

Comments
 (0)