Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - PF is using useId hook that is not supported by React 17 #11351

Closed
tlabaj opened this issue Dec 17, 2024 · 0 comments · Fixed by #11357
Closed

Bug - PF is using useId hook that is not supported by React 17 #11351

tlabaj opened this issue Dec 17, 2024 · 0 comments · Fixed by #11357
Milestone

Comments

@tlabaj
Copy link
Contributor

tlabaj commented Dec 17, 2024

Describe the problem
An issue was reported by a consumer in slack

useId() hook is not compatible not supported in React 17. PF still supports React 17, se we should not use this.

core/dist/esm/components/Card/CardHeader.js 15:21-32
export 'useId' (imported as 'React') 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)

WARNING in ./node_modules/@patternfly/react-core/dist/esm/components/DataList/DataListCheck.js 8:21-32
export 'useId' (imported as 'React') 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)

Expected behavior
A clear and concise description of the expected behavior.

Is this issue blocking you?
List the workaround if there is one.
yes

What is your product and what release date are you targeting?

Any other information?

@github-project-automation github-project-automation bot moved this to Needs triage in PatternFly Issues Dec 17, 2024
@tlabaj tlabaj removed the PF Team label Dec 17, 2024
@tlabaj tlabaj moved this from Needs triage to Ready to assign in PatternFly Issues Dec 17, 2024
@tlabaj tlabaj added this to the 2025.Q1 milestone Dec 17, 2024
@tlabaj tlabaj changed the title Bug - PF is using useId hook that is not supported by react 17. Bug - PF is using useId hook that is not supported by React 17 Dec 17, 2024
@tlabaj tlabaj moved this from Ready to assign to PR Review in PatternFly Issues Dec 18, 2024
tlabaj pushed a commit that referenced this issue Dec 19, 2024
* fix: replace react useId with lodash uniqueId (#11351)

* fix: use `GenerateId` instead of lodash.uniqueId
@github-project-automation github-project-automation bot moved this from PR Review to Done in PatternFly Issues Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant