React.js: npm start shows a different default route

I’m new to react and I have a weird problem that every time I do … Read more React.js: npm start shows a different default route

I’m new to react and I have a weird problem that every time I do npm start, I get on the same
page! how do I change it? (tried with few projects! the same page!)

routing:

import { Redirect, Route, Switch } from "react-router-dom";
import { Page404 } from "./Page404";
import { Login } from "./Login";
import { Logout } from "./Logout";
import { Register } from "./Register";

export const Routing = () => {
return (
<div>
  <Switch>
    <Route path="/login" component={Login} />
    <Route path="/logout" component={Logout} />
    <Route path="/register" component={Register} />

    <Redirect exact from="/" to="/login" />
    <Route component={Page404} />
  </Switch>
</div>
);
};

and the default route that I always get is:
http://localhost:3000/login-auth
EVERY time after npm start.

btw that started to happen when I installed firebase.
in this project I’m not even using firebase and it keeps happening

Thanks!

Source: React – Stack Overflow


Categories: NewsTags: , ,

Tags: , ,


Leave a Reply

Your email address will not be published. Required fields are marked *