-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Support for React < 18 #53
Comments
@JonathanAriass If we can support <18 without useId, I think we can accomplish this task. |
@jaywcjlove Can we use 'useId' for React 18 and only support client-side for React < 18? |
@EliazTray If this is the only issue, I can handle it easily. import { useRef } from 'react';
function useIdCompat() {
const idRef = useRef(null);
if (idRef.current === null) {
idRef.current = 'custom-id-' + Math.random().toString(36).substr(2, 9);
}
return idRef.current;
}
export default useIdCompat; |
@JonathanAriass @EliazTray Upgrade |
It took effect on |
Can we expect support for React < 18 in the future? I see that
useId
hook is being used and it is only available in React 18.The text was updated successfully, but these errors were encountered: