Skip to content

Commit 343dc2c

Browse files
author
Anton Backer
committed
Remove parens around single argument in React example
Parens around a single argument aren't in line with the js guide: If your function takes a single argument and doesn’t use braces, omit the parentheses. https://github.com/airbnb/javascript/blob/0814be638f22b01a8e49efd77094be24055a3d48/README.md#arrows--one-arg-parens Another rule violation: Wrap JSX tags in parentheses when they span more than one line. https://github.com/airbnb/javascript/blob/0814be638f22b01a8e49efd77094be24055a3d48/react/README.md#parentheses
1 parent 0afde8f commit 343dc2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

react/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,12 @@
291291
)}
292292
293293
// good
294-
{todos.map((todo) =>
294+
{todos.map(todo => (
295295
<Todo
296296
{...todo}
297297
key={todo.id}
298298
/>
299-
)}
299+
))}
300300
```
301301

302302
## Parentheses

0 commit comments

Comments
 (0)