Skip to content

Commit 024a727

Browse files
authored
Constrain the container type of createPortal (#24496)
We already constrained the type of createRoot (can't take document) and hydrateRoot (can't take fragments).
1 parent 3dc9a8a commit 024a727

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-dom/src/client/ReactDOM.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ setBatchingImplementation(
107107

108108
function createPortal(
109109
children: ReactNodeList,
110-
container: Container,
110+
container: Element | DocumentFragment,
111111
key: ?string = null,
112112
): React$Portal {
113113
if (!isValidContainer(container)) {

0 commit comments

Comments
 (0)