You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARNING: This is an experimental codemod to intended for codebases using unpublished types.
271
275
Only use if you're using https://github.com/DefinitelyTyped/DefinitelyTyped/pull/64896.
@@ -307,21 +311,18 @@ If the import style doesn't match your preferences, you should set up auto-fixab
307
311
+const element: React.JSX.Element = <div />;
308
312
```
309
313
310
-
### `experimental-useRef-required-initial`
311
-
312
-
WARNING: This is an experimental codemod to intended for codebases using unpublished types.
313
-
Only use if you're using https://github.com/DefinitelyTyped/DefinitelyTyped/pull/64920.
314
+
### `useRef-required-initial`
314
315
315
316
`useRef` now always requires an initial value.
316
-
Implicit `undefined` is forbidden
317
+
Implicit `undefined` is forbidden.
317
318
318
319
```diff
319
320
import * as React from "react";
320
321
-React.useRef()
321
322
+React.useRef(undefined)
322
323
```
323
324
324
-
#### `experimental-useRef-required-initial` false-negative pattern A
325
+
#### `useRef-required-initial` false-negative pattern A
325
326
326
327
Importing `useRef` via aliased named import will result in the transform being skipped.
0 commit comments