(element, container, callback)
| 24940 | } |
| 24941 | } |
| 24942 | function hydrate(element, container, callback) { |
| 24943 | if (!isValidContainer(container)) { |
| 24944 | { |
| 24945 | throw Error( "Target container is not a DOM element." ); |
| 24946 | } |
| 24947 | } |
| 24948 | |
| 24949 | { |
| 24950 | var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; |
| 24951 | |
| 24952 | if (isModernRoot) { |
| 24953 | 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)?'); |
| 24954 | } |
| 24955 | } // TODO: throw or warn if we couldn't hydrate? |
| 24956 | |
| 24957 | |
| 24958 | return legacyRenderSubtreeIntoContainer(null, element, container, true, callback); |
| 24959 | } |
| 24960 | function render(element, container, callback) { |
| 24961 | if (!isValidContainer(container)) { |
| 24962 | { |
nothing calls this directly
no test coverage detected