Skip to content

[react-redux] Fix tests assuming Provider supports children render props#58289

Merged
sandersn merged 1 commit into
DefinitelyTyped:masterfrom
eps1lon:fix/react-fragment/react-redux
Jan 21, 2022
Merged

[react-redux] Fix tests assuming Provider supports children render props#58289
sandersn merged 1 commit into
DefinitelyTyped:masterfrom
eps1lon:fix/react-fragment/react-redux

Conversation

@eps1lon
Copy link
Copy Markdown
Collaborator

@eps1lon eps1lon commented Jan 18, 2022

We plan to remove {} from ReactFragment since 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://github.com/reduxjs/react-redux/blob/v7.2.6/src/components/Provider.js#L34


ReactDOM.render((
<Provider store={store}>
{() => <App />}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


ReactDOM.render((
<Provider store={store}>
{() => <App />}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


ReactDOM.render((
<Provider store={store}>
{() => <App />}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a 6.x reference but since both 5.x and 7.x require an element, I'm assuming 6.x behaves the same in this regard.

@eps1lon eps1lon marked this pull request as ready for review January 18, 2022 19:45
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Jan 18, 2022

@eps1lon Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because 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

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Most recent commit is approved by a DT maintainer

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 58289,
  "author": "eps1lon",
  "headCommitOid": "8d703ab25bc2a03b4b50c9e82eb3c3f42797ce73",
  "mergeBaseOid": "c609479376c92be2991c6d072a70201f7e225047",
  "lastPushDate": "2022-01-18T19:24:52.000Z",
  "lastActivityDate": "2022-01-19T05:59:02.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "react-redux",
      "kind": "edit",
      "files": [
        {
          "path": "types/react-redux/react-redux-tests.tsx",
          "kind": "test"
        },
        {
          "path": "types/react-redux/v5/react-redux-tests.tsx",
          "kind": "test"
        },
        {
          "path": "types/react-redux/v6/react-redux-tests.tsx",
          "kind": "test"
        }
      ],
      "owners": [
        "tkqubo",
        "clayne11",
        "tansongyang",
        "nicholasboll",
        "mdibyo",
        "val1984",
        "jrakotoharisoa",
        "apapirovski",
        "surgeboris",
        "soerenbf",
        "mrwolfz",
        "dylanvann",
        "Lazyuki",
        "kazuma1989",
        "megazazik",
        "jun-sheaf",
        "phryneas",
        "markerikson"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "markerikson",
      "date": "2022-01-18T19:55:54.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 1015776085,
  "ciResult": "pass"
}

@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @tkqubo @clayne11 @tansongyang @NicholasBoll @mDibyo @val1984 @jrakotoharisoa @apapirovski @surgeboris @soerenbf @MrWolfZ @DylanVann @Lazyuki @kazuma1989 @megazazik @jun-sheaf @phryneas @markerikson — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

Copy link
Copy Markdown

@markerikson markerikson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm pretty sure we stopped supporting those functions a long time ago - that was an early requirement in like React-Redux 1.x or 2.x?

btw, could you also check if our v8.0 actual TS files need to be updated related to this?

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Jan 18, 2022
@eps1lon
Copy link
Copy Markdown
Collaborator Author

eps1lon commented Jan 19, 2022

btw, could you also check if our v8.0 actual TS files need to be updated related to this?

Sure, will do!

@sandersn sandersn merged commit c2dadf7 into DefinitelyTyped:master Jan 21, 2022
@eps1lon eps1lon deleted the fix/react-fragment/react-redux branch January 22, 2022 21:18
@eps1lon
Copy link
Copy Markdown
Collaborator Author

eps1lon commented Jan 31, 2022

btw, could you also check if our v8.0 actual TS files need to be updated related to this?

Sure, will do!

Done: reduxjs/react-redux#1868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Owner Approved A listed owner of this package signed off on the pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants