I'm working with a react app, and I have the router setup, the issue is I currently have three components available to the user via the Link component and this is how those are in the jsx.
<Fragment>
<NavItem>
<Link to='/login'>Login</Link>
</NavItem>
<NavItem>
<Link to="/regiser">Register</Link>
</NavItem>
<NavItem>
<Link to="/reset">Recover Account</Link>
</NavItem>
</Fragment>
and the routes are defined with BrowserRouter aliased to Router
<Fragment>
<Route exact path='/' component={Landing} />
<Route exact path='/register' component={Register} />
<Route exact path='/login' component={Login} />
<Route exact path='/reset' component={ResetUser} />
</Fragment>
The issue is this:
Landing
component when at /
Login
component when at /login
ResetUser
component when at /reset
/register
The Register
component is defined like this:
import React, { Component, Fragment } from "react";
class Register extends Component {
render() {
return (
<div>Hello Register</div>
);
}
}
export default Register;
which is infuriating because it's really holding me up for testing authentication.......
Is it the typo in regiser? it should be register!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.