我正在使用React和bootstrap开发web应用程序.当应用按钮onClick时,我很难让我的页面重定向到另一个页面.如果在a href之后,我无法进入另一个页面.
那么,您能告诉我是否需要使用react navigation或其他工具来使用Button onClick导航页面吗?
import React, { Component } from 'react';
import { Button, Card, CardBody, CardGroup, Col, Container, Input, InputGroup, InputGroupAddon, InputGroupText, Row, NavLink } from 'reactstrap';
class LoginLayout extends Component {
render() {
return (
<div className="app flex-row align-items-center">
<Container>
...
<Row>
<Col xs="6">
<Button color="primary" className="px-4">
Login
</Button>
</Col>
<Col xs="6" className="text-right">
<Button color="link" className="px-0">Forgot password?</Button>
</Col>
</Row>
...
</Container>
</div>
);
}
}