How to call an event on tabs changed in react-bootstrap
问题 I've implemented Navigation Tabs in my React application using React-Bootstrap. Like this: <Tabs defaultActiveKey={1}> <Tab eventKey={1} title="Log in"> {/* Irrelevant code */} </Tab> <Tab eventKey={1} title="Sign up"> {/* Irrelevant code */} </Tab> </Tabs> Now on changing tabs I would like to call the following funtion: changeTab(login) { if (login) this.setState({ heading: "Log in" }) else this.setState({ heading: "Sign up" }) } Where login is a Boolean that will be true for when the Log in