Ok, I have a project and in the past I made a koa SPA (using koa-static) because I needed it to run the page on heroku, the thing is that now I have react-router in my page and it works half fine. For example using the buttons that I have in the page that have the Link component (aka the component that react router uses to send the user to another route) works fine, and at the same time it changes the url, the thing that doesn't work is when I try to refresh the page/go back(for example if I was on route "/path" and now I am on "/" and I want to go back using the browser buttons it doesnt work)/introduce the url manually in the browser it doesnt work, koa just says Not found and that's because koa doesnt know that those paths are routes in the app rather than actual files/folders.
My question is, how can I make koa work with react router or how can I somehow make react router not change the paths in the url or idk something like that.