Open History to see the last commit
1import * as React from 'react'
2import { useUUID } from './useUUID'
3β
4/**
5 * React 17 does not have the useId hook, so we use a random uuid as a fallback.
6 * This is needed to avoid bundlers trying to import non-existing export.
7 * Read more: https://github.com/webpack/webpack/issues/14814
8 */
9const _React = React
10export const useFormId =
11 React.version.split('.')[0] === '17' ? useUUID : _React.useId