hyperapp-router
hyperapp-router copied to clipboard
How do I set the public path aka basename?
On my local, I use http://localhost:8080/greetings, but deployed its https://production/some-path/greetings
In my code, I want to write <Route path="/greetings" render={Greetings} />
and have it work in both dev and production
React-router has this: https://reacttraining.com/react-router/web/api/BrowserRouter/basename-string
Let's add basename then. 👍
I agree. I needed it in some projects. And the concatenation trick is not really useful.