UNPKG

273 BPlain TextView Raw
1import {version} from 'react';
2
3export function inertValue(value?: boolean) {
4 const pieces = version.split('.');
5 const major = parseInt(pieces[0], 10);
6 if (major >= 19) {
7 return value;
8 }
9 // compatibility with React < 19
10 return value ? 'true' : undefined;
11}