title: react-router+antD/ How to highlight a menu item when press back/forward button?
body: <p>I create a menu and want to highlight the item which i choose,and i did it. But when i press back/forward button,the menu item don't highlight. What should i do?  </p>
  
  <p>I have tried to use addEventListener but failed.</p>
  
  <p>Have someone could give some advice? </p>
  
  <pre class="lang-js prettyprint-override"><code>class Sidebar extends React.Component {
      constructor(props) {
          super(props);
          this.state={
              test: "home"
          }
          this.menuClickHandle = this.menuClickHandle.bind(this);
      }
  
      componentWillMount(){
          hashHistory.listen((event)=&gt;{
              test1 = event.pathname.split("/");
          });
          this.setState({
              test:test1[1]
          });
      }
  
      menuClickHandle(item) {
          this.props.clickItem(item.key);
      }
  
      onCollapseChange() {
          this.props.toggle();
      }
  
      render() {
          var {collapse} = this.props;
          return (
              &lt;aside className="ant-layout-sider"&gt;
                  &lt;Menu mode="inline" theme="dark" defaultSelectedKeys={[this.state.test || "home"]} onClick={this.menuClickHandle.bind(this)}&gt;
                      &lt;Menu.Item key="home"&gt;
                          &lt;Link to="/home"&gt;
                              &lt;Icon type="user"/&gt;&lt;span className="nav-text"&gt;用户管理&lt;/span&gt;
                          &lt;/Link&gt;
                      &lt;/Menu.Item&gt;
                      &lt;Menu.Item key="banner"&gt;
                          &lt;Link to="/banner"&gt;
                              &lt;Icon type="setting"/&gt;&lt;span className="nav-text"&gt;Banner管理&lt;/span&gt;
                          &lt;/Link&gt;
                      &lt;/Menu.Item&gt;
                  &lt;/Menu&gt;
                  &lt;div className="ant-aside-action" onClick={this.onCollapseChange.bind(this)}&gt;
                      {collapse ? &lt;Icon type="right"/&gt; : &lt;Icon type="left"/&gt;}
                  &lt;/div&gt;
              &lt;/aside&gt;
          )
      }
  }
  </code></pre>