【发布时间】:2017-10-15 20:54:12
【问题描述】:
反应组件上的 UI。我有一个<BottomNavigationItem /> 组件。这实际上呈现为<button>。我怎样才能真正让它呈现/导航到一个 URL?
class FooterNavigation extends Component {
state = {
selectedIndex: 0,
};
select = (index) => this.setState({selectedIndex: index});
render() {
return (
<footer className="mdl-mini-footer">
<Paper zDepth={1}>
<BottomNavigation selectedIndex={this.state.selectedIndex}>
<BottomNavigationItem
label="Reviews"
icon={reviewIcon}
onClick={() => this.select(0)}
/>
</BottomNavigation>
</Paper>
</footer>
);
}
}
【问题讨论】:
标签: javascript reactjs typescript material-design material-ui