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 09146d2 commit 734ce44Copy full SHA for 734ce44
src/core-react.ts
@@ -121,11 +121,11 @@ export function useForceUpdate() {
121
export function useUniqueId() {
122
if (SSR_SUPPORT_ENABLED) {
123
if (React.version.startsWith("18")) {
124
- return `s${React.useId().replace(/\:/g, "")}`;
+ return `s${(React as any)["useId"]().replace(/\:/g, "")}`;
125
}
126
127
- if ((React as any).unstable_useOpaqueIdentifier) {
128
- return `s${(React as any).unstable_useOpaqueIdentifier().replace(/\:/g, "")}`;
+ if ((React as any)["unstable_useOpaqueIdentifier"]) {
+ return `s${(React as any)["unstable_useOpaqueIdentifier"]().replace(/\:/g, "")}`;
129
130
131
0 commit comments