mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
11 lines
341 B
TypeScript
11 lines
341 B
TypeScript
// ZombieJ: This is only warn for React 17 not support.
|
|
// But Jest mock React 17 will cause many issues in testing,
|
|
// Can be safe to remove in next major version.
|
|
|
|
import { version } from 'react';
|
|
|
|
export default function getReactMajorVersion() {
|
|
const majorVersion = Number.parseInt(version.split('.')[0], 10);
|
|
return majorVersion;
|
|
}
|