MCPcopy Index your code
hub / github.com/react/react / readIntoContainer

Function readIntoContainer

packages/react-dom/src/__tests__/ReactDOMFizzForm-test.js:78–91  ·  view source on GitHub ↗
(stream)

Source from the content-addressed store, hash-verified

76 }
77
78 async function readIntoContainer(stream) {
79 const reader = stream.getReader();
80 let result = '';
81 while (true) {
82 const {done, value} = await reader.read();
83 if (done) {
84 break;
85 }
86 result += Buffer.from(value).toString('utf8');
87 }
88 const temp = document.createElement('div');
89 temp.innerHTML = result;
90 insertNodesAndExecuteScripts(temp, container, null);
91 }
92
93 it('should allow passing a function to form action during SSR', async () => {
94 const ref = React.createRef();

Callers 1

Calls 2

toStringMethod · 0.65

Tested by

no test coverage detected