[react-router] Fix children render props test using match#58287
Conversation
| } | ||
|
|
||
| const OldSchoolMenuLink: React.FC<OldSchoolMenuLinkProps> = ({ label, to, activeOnlyWhenExact }) => ( | ||
| <Route path={to as string} exact={activeOnlyWhenExact} children={(params: { match: boolean }) => ( |
There was a problem hiding this comment.
Was only passing because this function was assignable to {} but not the actual render-props: https://v5.reactrouter.com/web/api/Route/children-func.
|
@eps1lon Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 58287,
"author": "eps1lon",
"headCommitOid": "33befe7552537cc09fe06d2524da642d43cb5b00",
"mergeBaseOid": "c609479376c92be2991c6d072a70201f7e225047",
"lastPushDate": "2022-01-18T19:23:06.000Z",
"lastActivityDate": "2022-01-25T09:03:00.000Z",
"mergeOfferDate": "2022-01-25T00:33:49.000Z",
"mergeRequestDate": "2022-01-25T09:03:00.000Z",
"mergeRequestUser": "eps1lon",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "react-router",
"kind": "edit",
"files": [
{
"path": "types/react-router/test/examples-from-react-router-website/CustomLink.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/CustomLink.tsx",
"kind": "test"
}
],
"owners": [
"sergey-buturlakin",
"mrk21",
"vasek17",
"ngbrown",
"awendland",
"KostyaEsmukov",
"johnnyreilly",
"LKay",
"DovydasNavickas",
"huy-nguyen",
"grmiade",
"DaIgeb",
"egorshulga",
"rraina",
"t49tran",
"8enSmith",
"wezleytsai",
"eps1lon",
"HipsterBrown",
"pawfa"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "gabritto",
"date": "2022-01-25T00:33:12.000Z",
"isMaintainer": true
}
],
"mainBotCommentID": 1015766922,
"ciResult": "pass"
} |
|
🔔 @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @huy-nguyen @Grmiade @DaIgeb @egorshulga @rraina @t49tran @8enSmith @wezleytsai @HipsterBrown @pawfa — please review this PR in the next few days. Be sure to explicitly select |
|
@eps1lon: Everything looks good here. I am ready to merge this PR (at 33befe7) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@sergey-buturlakin, @mrk21, @vasek17, @ngbrown, @awendland, @KostyaEsmukov, @johnnyreilly, @LKay, @DovydasNavickas, @huy-nguyen, @Grmiade, @DaIgeb, @egorshulga, @rraina, @t49tran, @8enSmith, @wezleytsai, @HipsterBrown, @pawfa: you can do this too.) |
|
Ready to merge |
We plan to remove
{}fromReactFragmentsince it's not actually an allowed type for children of host components (e.g.<div>{{}}</div>would throw at runtime) (see #56026 for previous attempts).This change is required to pass #56210
https://v5.reactrouter.com/web/api/match
https://v5.reactrouter.com/web/api/Route/children-func