(element, container, callback)
| 28500 | } |
| 28501 | } |
| 28502 | function hydrate(element, container, callback) { |
| 28503 | if (!isValidContainer(container)) { |
| 28504 | { |
| 28505 | throw Error( "Target container is not a DOM element." ); |
| 28506 | } |
| 28507 | } |
| 28508 | |
| 28509 | { |
| 28510 | var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; |
| 28511 | |
| 28512 | if (isModernRoot) { |
| 28513 | error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?'); |
| 28514 | } |
| 28515 | } // TODO: throw or warn if we couldn't hydrate? |
| 28516 | |
| 28517 | |
| 28518 | return legacyRenderSubtreeIntoContainer(null, element, container, true, callback); |
| 28519 | } |
| 28520 | function render(element, container, callback) { |
| 28521 | if (!isValidContainer(container)) { |
| 28522 | { |
nothing calls this directly
no test coverage detected