Skip to content

Commit 4ca6b43

Browse files
committed
Merge pull request kriasoft#480 from NestorTejero/patch-1
Fix items.map call - missing parantheses
2 parents 5e3b4c6 + ec53e30 commit 4ca6b43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/react-style-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ For more information google for [component-based UI development](https://google.
5252
class Navigation extends Component {
5353
static propTypes = { items: PropTypes.array.isRequired };
5454
render() {
55-
return <nav><ul>{this.props.items.map(x => <li>{x.text}</li>}</ul></nav>;
55+
return <nav><ul>{this.props.items.map(x => <li>{x.text}</li>)}</ul></nav>;
5656
}
5757
}
5858

5959
// Better
6060
function Navigation({ items }) {
6161
return (
62-
<nav><ul>{items.map(x => <li>{x.text}</li>}</ul></nav>;
62+
<nav><ul>{items.map(x => <li>{x.text}</li>)}</ul></nav>;
6363
);
6464
}
6565
Navigation.propTypes = { items: PropTypes.array.isRequired };

0 commit comments

Comments
 (0)