crsandeep/simple-react-full-stack

Routes

Closed this issue · 4 comments

Hi.
Thanks for fixing the images, it works all good now.
For my react app, I have the following routes to display the components of sign-up and sign-in pages.

  <Switch>
              <Route exact path="/" component={Signin}/>
              <Route path="/auth/sign-in" component={Signin}/>
              <Route path="/auth/sign-up" component={Signup}/>
    </Switch>

When I run my react app as standalone (without the simple-react-full-stack repo) it works perfectly and no errors, but after implementing my own react files to the simple-react-full-stack repo, the paths (/auth/sign-up and /auth/sign-in) keep saying error 404's, what could be the issue, should it be acting like that?

Another question is, any plans for Docker deployment?

@mikk-io I have added a sample code integrating with react router in router branch https://github.com/crsandeep/simple-react-full-stack/tree/router.

I have not used docker but if anyone is willing to contribute then I can definitely merge it

@crsandeep That partially works, although when you go to custom url for the first time and refresh the specific route in your browser, it returns error 404. You have skype or something alternative?

@mikk-io a simple option is to use HashRouter. I have updated code to use HashRouter. But it has quirks as well. You can read in detail about the options here https://stackoverflow.com/a/36623117

closing since there is no activity