Closed grncdr closed 5 months ago
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 470215124084c5c61c7911543fd6ebb81d720639:
Sandbox | Source |
---|---|
react-testing-library-examples | Configuration |
Hi @grncdr, thanks for taking the time to open this.
Container does exist in react-dom/client
as can be seen here:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/b0ea84700707b027d6eb37328b16b294dcc9d31a/types/react-dom/client.d.ts#L41
But it really depends on the type of ReactDOM you're using. The separation didn't exist in React 17 AFAIR.
Hi @MatanBobi, first sorry for opening a spurious issue, and thanks for the pointer to the actual problem.
I'm using React 18 but didn't notice @types/react-dom
had been pinned to 18.0.1
via a yarn resolution. Updating to 18.3.0 resolved it for me. 👍
What:
Fix the imported
Container
type fromreact-dom
Why:
The
react-dom/client
module does not export theContainer
type, onlyreact-dom
does.How:
Updating types/index.d.ts
Checklist:
Thanks for the great library! 👍