Skip to content

Commit 94c8a32

Browse files
Revert "add artifical delay amd log statements"
This reverts commit cd57337.
1 parent 32f8b36 commit 94c8a32

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

node_package/src/RSCRoute.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,10 @@ export type RSCRouteProps = {
77
};
88

99
const RSCRoute = ({ componentName, componentProps }: RSCRouteProps) => {
10-
React.useEffect(() => {
11-
console.log('RSCRoute mounted for', componentName, '[DEBUG RSC]');
12-
13-
return () => {
14-
console.log('RSCRoute unmounted for', componentName, '[DEBUG RSC]');
15-
};
16-
}, [componentName]);
17-
1810
const { getComponent, getCachedComponent } = useRSC();
1911
let component = getCachedComponent(componentName, componentProps);
2012
if (!component) {
21-
console.log(`RSCRoute component ${componentName} not found, fetching`, '[DEBUG RSC]');
2213
component = React.use(getComponent(componentName, componentProps));
23-
console.log(`RSCRoute component ${componentName} fetched`, '[DEBUG RSC]');
2414
}
2515
return component;
2616
};

node_package/src/getReactServerComponent.server.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ const getReactServerComponent = async ({
8080
railsContext.reactServerClientManifestFileName,
8181
railsContext.reactClientManifestFileName,
8282
);
83-
await new Promise((resolve) => {
84-
setTimeout(resolve, 2000);
85-
});
8683
const rscPayloadStream = await ReactOnRails.getRSCPayloadStream(
8784
componentName,
8885
componentProps,

node_package/src/transformRSCStreamAndReplayConsoleLogs.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ export default function transformRSCStreamAndReplayConsoleLogs(stream: ReadableS
1212

1313
const handleJsonChunk = (chunk: RSCPayloadChunk) => {
1414
const { html, consoleReplayScript = '' } = chunk;
15-
if (html.includes('client7.chunk.js')) {
16-
console.log('received client7.chunk.js at chunk [DEBUG RSC]', chunk);
17-
}
18-
if (html.includes('client6.chunk.js')) {
19-
console.log('received client6.chunk.js at chunk [DEBUG RSC]', chunk);
20-
}
2115
controller.enqueue(encoder.encode(html ?? ''));
2216

2317
const replayConsoleCode = consoleReplayScript

0 commit comments

Comments
 (0)