As I understand from the docs, history module is built into react-router. How would one use browserHistory
with a custom basename
?
Let's say I have a number of smaller, independent React apps deployed with their own paths, like http://somebigapp.com/app1/
, http://somebigapp.com/app2/
. Is there a way to pass an option to browserHistory
where I could define basename
for my apps, or does browserHistory
assume /
as the root path?
Thanks for your question!
We want to make sure that the GitHub issue tracker remains the best place to track bug reports and feature requests that affect the development of React Router.
Questions like yours deserve a purpose-built Q&A forum. Could you post this question to Stack Overflow with the tag #react-router? https://stackoverflow.com/questions/ask?tags=react-router
We also have an active and helpful React Router community on Reactiflux, which is a great place to get fast help with React Router and with the rest of the React ecosystem. You can join at https://discord.gg/0ZcbPKXt5bYaNQ46.
Hmm... perhaps improved documentation would solve this issue.
@zettadam Come help! :smile: #2933
So what is the canonical way of doing this? Creating a router and passing in the history? If so I've tried this so far with no luck.
Most helpful comment
Hmm... perhaps improved documentation would solve this issue.