-
Notifications
You must be signed in to change notification settings - Fork 15.4k
React Router: Add React Router Testing section #30085
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
React Router: Add React Router Testing section #30085
Conversation
Co-authored-by: mao-sz <122839503+mao-sz@users.noreply.github.com>
Hi @mao-sz Would like bit of feedback on something:
The reason for adding it, is that I'm not sure how obvious it is you can just import your actual route config and use it in your tests. |
Co-authored-by: mao-sz <122839503+mao-sz@users.noreply.github.com>
@mao-sz maybe we could add a sentence introducing it in the |
Good catch, I think that's sensible. Just add a brief lesson overview item. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
@goran1010 I'm silly and didn't double check the doc links used. Is there a reason you opted for v5 and v6 docs? |
Yes @mao-sz , Here are the two links side by side for Unless I'm missing something obvious about how to navigate through the docs, I much prefer the older version. |
Thing is, the v6 docs contain outdated imports. People have already gotten confused with the differing imports, and the lessons have been amended to reference v7 docs (which is sensible). The same applies for If you personally prefer how v6 docs include a little more context than v7 docs, you can always open an issue/PR in the RR repo suggesting improvements to the current docs. That'd be out of TOP's scope as far as I'm concerned. |
Alright - I'll open a new PR to fix this up ASAP. |
Added the PR fixing the links #30096 - sorry about the oversight on my part BTW. |
No worries, also an oversight by me not checking the links themselves. |
Because
Since a question on how to test components using React Router is a fairly common one, this PR addressees the need to have a short explanation on it.
Testing apps using React client side routing, and how it needs to be done, is not mentioned anywhere in the curriculum, yet the Shopping Cart project and other projects where front-end would be built using React will most likely be using React Router for client side routing and really needs (at least) a mention on how to test it - since it requires some modification and is not as straightforward as non React Router apps.
This PR
Issue
Closes #30084
Pull Request Requirements
location of change: brief description of change
format, e.g.Intro to HTML and CSS lesson: Fix link text
Because
section summarizes the reason for this PRThis PR
section has a bullet point list describing the changes in this PRIssue
section