Skip to content

Commit 36ad54e

Browse files
release: 3.2.0 (#370)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 7535bfc commit 36ad54e

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

.changeset/thick-snakes-float.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# types-react-codemod
22

3+
## 3.2.0
4+
5+
### Minor Changes
6+
7+
- Add `no-implicit-ref-callback-return` transform ([#369](https://github.com/eps1lon/types-react-codemod/pull/369) [`7535bfc`](https://github.com/eps1lon/types-react-codemod/commit/7535bfcd568806578460f97390a88368b25bdeb8) by [@eps1lon](https://github.com/eps1lon))
8+
9+
Ensures you don't accidentally return anything from ref callbacks since the return value was always ignored.
10+
With ref cleanups, this is no longer the case and flagged in types to avoid mistakes.
11+
12+
```diff
13+
-<div ref={current => (instance = current)} />
14+
+<div ref={current => {instance = current}} />
15+
```
16+
17+
The transform is opt-in in the `preset-19` in case you already used ref cleanups in Canary releases.
18+
319
## 3.1.1
420

521
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "types-react-codemod",
3-
"version": "3.1.1",
3+
"version": "3.2.0",
44
"bin": "bin/types-react-codemod.cjs",
55
"scripts": {
66
"format": "prettier . --write",

0 commit comments

Comments
 (0)