You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A recent PR - #16988, which was part of the v1.63.0 release of @carbon/react has moved to using useId in more places. There is handling for the correct version here
// React 18 introduced a new hook called `useId` that takes care of hydration
but this seems to not be working since that PR.
When running a storybook-smoke-test (npm run storybook-smoke-test) we are seeing:
WARN export 'useId' (imported as 'useId') was not found in 'react' (possible exports: Children, Component, Fragment, Profiler, PureComponent, StrictMode, Suspense, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, cloneElement, createContext, createElement, createFactory, createRef, forwardRef, isValidElement, lazy, memo, useCallback, useContext, useDebugValue, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, version)
I believe the initial PR to fix this was #14153, and I can't see that file being changed since so it's not immediately obvious why it's no longer working.
Create an environment with react 16.14.0, @carbon/[email protected] and a storybook set up.
Run npm run storybook-smoke-test and observe warning about useId
Suggested Severity
Severity 1 = Must be fixed ASAP. The response must be swift. Someone from the team must drop all current work and be immediately reassigned to address the issue.
Package
@carbon/react
Browser
No response
Package version
v1.63.0
React version
16.14.0
Description
A recent PR - #16988, which was part of the
v1.63.0
release of@carbon/react
has moved to usinguseId
in more places. There is handling for the correct version herecarbon/packages/react/src/internal/useId.js
Line 26 in f22da5a
When running a storybook-smoke-test (
npm run storybook-smoke-test
) we are seeing:I believe the initial PR to fix this was #14153, and I can't see that file being changed since so it's not immediately obvious why it's no longer working.
Reproduction/example
[email protected], @carbon/[email protected]
Steps to reproduce
16.14.0
,@carbon/[email protected]
and a storybook set up.npm run storybook-smoke-test
and observe warning aboutuseId
Suggested Severity
Severity 1 = Must be fixed ASAP. The response must be swift. Someone from the team must drop all current work and be immediately reassigned to address the issue.
Application/PAL
Cloud Pak For Integration (Platform UI)
Code of Conduct
The text was updated successfully, but these errors were encountered: