-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Add redirect, props, forcedProps to react-router-config route keys and inject renderChild function prop #6170
Conversation
I'm having a little trouble with the build. All the tests are passing just fine locally... Any pointers on how to fix the build would be greatly appreciated :-) |
Don't touch the package.json file. You've updated a bunch of dependencies, so it's no longer able to build. Also, I wouldn't worry about cleaning up the readme in this PR. Just focus on the code and tests for now. |
@timdorr I didn't intentionally update a bunch of dependencies. I only changed the dependency on react-router to This PR makes use of the new In any case, I've reverted my commit of the change to Any ideas what I'm missing to make the tests pass with npm in the monorepo? They work beautifully for me when I use |
RR uses lerna to link the different packages, so while the |
I'm quite familiar with Here is what I tried before making the PR to get the tests to run from the root of the mono repo:
So first off there are tests failing when I do that. (Filed an issue #6174) Then I tried disabling the failing tests applying the changes from this PR and re-ran the tests from the mono repo root:
This is where things get funky, weird errors starting happening where imports from I've been trying to pin down what the issue is but that's a bit difficult to do when the tests on master we not passing to begin with. :-( |
I was just digging in to how Lerna checks for local dependencies and you were right to update the package version. Lerna uses |
I had a little spare time this morning so I tinkered with the I've updated this PR with those changes, but I had to mimic the CI and disable the website build until somebody comes up with a way to make it run in a separate build phase after the other packages. I've had luck managing this in mono repos by splitting all the package.json script names across the mono repo packages into categories. That makes it a lot easier to just do this from the mono repo root and get all the things in the right order:
It might be helpful to consider a similar strategy for this repo... A quick version of this would be to update the Also note that the I only didn't commit those changes because it's outside the scope of this PR... |
I merged the latest from master (4.3.1) and the tests are passing now. I also added the latest changes to adds an Please let me know if there's anything I can do to help get this merged. |
@timdorr @mjackson Is there any likelihood that this will eventually get merged? In the interim, we've been using the forked package react-router-routes. I won't bother trying to fix the merge conflicts here unless it's likely to get merged... ;-) |
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. |
Well, I gotta say it’s kinda frustrating that these great & useful additions to the package have stagnated for a lack of attention.... 😞 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I marked this so it won't be touched by stalebot again. Can you rebase against the latest master? |
@timdorr I’m doing some holiday traveling at the moment but will take a look at rebasing whenever I get the chance, probably early next week. |
I just spent a couple of hours trying to rebase and it got really messy and confusing due to all the other changes that have happened in the 1.5 years since I last worked on this PR. I did however manage to get all the tests passing locally against master with the changes & added tests from this PR. If somebody can tell me that the features I added are likely to be merged then I'll find some more time to work on this. |
Co-authored-by: Jacob Ebey <[email protected]>
TLDR
Adds
redirect
,props
,forcedProps
as keys toroute
:And passes a
renderChild = props => renderRoutes(route, { extraProps: props })
function to all routecomponents
:Docs and tests updated accordingly