Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React-router params #58

Open
keyofevergreen opened this issue Mar 16, 2022 · 2 comments
Open

React-router params #58

keyofevergreen opened this issue Mar 16, 2022 · 2 comments

Comments

@keyofevergreen
Copy link

Hello!
I keep id in router params.
And when the page is reloaded, a request is made to the server for this id

But for some reason, nothing happens to me instead and it seems that the whole application crashes (white screen, 404 errors in the console)

I don't understand what's wrong. Didn't find a solution..

@Jasperhino
Copy link

I have the same problem using React BrowserRouter with useParams(). Did anyone find a solution for this yet?

@Jasperhino
Copy link

I just solved it, the problem was, that the app was looking for owner.github.io/assets/index.js instead of owner.github.io/repo/assets/index.js. I solved this by adding base: '/repo/' in my vite.config.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants