Skip to content

Instantly share code, notes, and snippets.

@luillyfe
Last active November 3, 2018 20:16
Show Gist options
  • Save luillyfe/1d64c7af3c879abaac8a2f4c68e40fb6 to your computer and use it in GitHub Desktop.
Save luillyfe/1d64c7af3c879abaac8a2f4c68e40fb6 to your computer and use it in GitHub Desktop.
import { Component } from "react";
class App extends Component {
constructor(props) {
super(props);
this.state.options = [
{id: 1, name: "home"},
{id: 2, name: "aboutUs"},
{id: 3, name: "contactUs"}
];
}
render() {
return (
<div>
<Menu options={this.state.options} />
...
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment