Skip to content

Commit 31bf86e

Browse files
authored
Expand wrong example
1 parent 83c04d6 commit 31bf86e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/rules/mandatory-scope-binding.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ const GoodButton = () => {
1515

1616
// 👎 Event is not wrapped with `useUnit` - component is not suitable for isomorphic SSR app
1717
const BadButton = () => {
18-
return <button onClick={increment}>+</button>;
18+
const onClick = () => {
19+
increment()
20+
}
21+
return <button onClick={onClick}>+</button>;
1922
};
2023
```

0 commit comments

Comments
 (0)