(value?: boolean)
| 1 | import {version} from 'react'; |
| 2 | |
| 3 | export function inertValue(value?: boolean): string | boolean | undefined { |
| 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 | } |
no outgoing calls
no test coverage detected