-
-
Notifications
You must be signed in to change notification settings - Fork 198
feature: add basename feature #443
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
Conversation
|
I've noticed that this repo has become a bit stagnant (last accepted PR's and releases are from December). @nimaa77, are you potentially interested in releasing a new (IMO useful) feature? 😄 |
|
Hi, no worries I'm going to check it after I finished my 9 to 5 job 😀🔥 |
|
Haha, that's alright, I was just checking up on you, because as I said - I didn't see any activity here for a while 😄 |
|
Yeah, I was lost for a while. It's time to get things under control again 🔥 |
|
Glad to have you back @nimaa77 |
|
Sooo, not that I want to nudge you, but were you guys able to take a look? 😄 |
|
sorry I completely forgot it working on it, will test it and if everything was fine I will merge it later today |
|
No worries, everyone has their own duties outside of open source stuff 😄 |
|
@nimaa77, were you able to take a look at this? I'm not saying to merge it right away as it's a breaking change kind of thing, but I think it could be pretty useful for plenty of people. I have now tested it in production based on my branch and it seems to be working just fine. |
@jaredpalmer @nimaa77 , on that topic - as an avid razzle user looking at the future of react builds for me and my company i work for After.js has always been of interest but so has Next.js. The thing i like about After.js is the control over the router however having seen the 4.x roadmap and the last commit date may I ask what the status is of this project and or should i expect to see anything this year in terms of updates/progress? I ask to just try and think about whats the current/next best thing to keep my websites up to date with for the code health but team onboarding and longevity. Any response will do honestly - i love the work you've put out or else i wouldn't ask! Thanks in advance! |
|
@stevengrimaldo expect something great and big (read it with Dutch voice a character in RDR game) @DeviousM I know I promised to review and merge this couple weeks ago, I was really busy |
|
@nimaa77 - no worries! I actually initially committed a bit broken thing (I pushed my forks names by accident) 😅 |
@nimaa77 ok great! thank you, i'm in Discord. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |

This PR adds a support for a react-router feature that's called "basename" (https://reactrouter.com/web/api/StaticRouter/basename-string). It allows you to put an app in ie. a subdirectory, without having to rewrite the whole route structure. It's super useful if your app is designed to run under a set of different environments.
This PR is introducing a BREAKING CHANGE.
ensureReadyfunction now accepts an object with properties. So far it accepted two parameters: routes and a pathname (which actually was not documented anywhere), now it accepts{ routes, pathname, basename }.That probably could be done differently, but there's no way to use a third parameter without having to explicitly provide a second one (it'd have to be
ensureReady(routes, undefined, '/somebasename'), which IMO is a crappy way to solve that). Having an object as an accepted value here solves any future needs of adding any more options (if needed).I did not update the README yet, though I did update all of the examples. I will update the README if this PR will be ready to merge.