We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5e3b4c6 + ec53e30 commit 4ca6b43Copy full SHA for 4ca6b43
docs/react-style-guide.md
@@ -52,14 +52,14 @@ For more information google for [component-based UI development](https://google.
52
class Navigation extends Component {
53
static propTypes = { items: PropTypes.array.isRequired };
54
render() {
55
- return <nav><ul>{this.props.items.map(x => <li>{x.text}</li>}</ul></nav>;
+ return <nav><ul>{this.props.items.map(x => <li>{x.text}</li>)}</ul></nav>;
56
}
57
58
59
// Better
60
function Navigation({ items }) {
61
return (
62
- <nav><ul>{items.map(x => <li>{x.text}</li>}</ul></nav>;
+ <nav><ul>{items.map(x => <li>{x.text}</li>)}</ul></nav>;
63
);
64
65
Navigation.propTypes = { items: PropTypes.array.isRequired };
0 commit comments