Skip to content

Commit 0734cc5

Browse files
linting
1 parent 95ecbf1 commit 0734cc5

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

node_package/src/RSCProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import { RailsContext, RailsContextWithServerStreamingCapabilities } from './types/index.ts';
2+
import { RailsContext } from './types/index.ts';
33
import getReactServerComponent from './getReactServerComponent.client.ts';
44

55
type RSCContextType = {

node_package/src/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const assertRailsContextWithServerStreamingCapabilities: (
101101
assertRailsContextWithServerComponentMetadata(context);
102102

103103
if (!('getRSCPayloadStream' in context) || !('addPostSSRHook' in context)) {
104-
throwRailsContextMissingEntries('getRSCPayloadStream function');
104+
throwRailsContextMissingEntries('getRSCPayloadStream and addPostSSRHook functions');
105105
}
106106
};
107107

node_package/src/wrapServerComponentRenderer/client.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import * as React from 'react';
22
import * as ReactDOMClient from 'react-dom/client';
3-
import {
4-
ReactComponentOrRenderFunction,
5-
RenderFunction,
6-
assertRailsContextWithServerStreamingCapabilities,
7-
} from '../types/index.ts';
3+
import { ReactComponentOrRenderFunction, RenderFunction } from '../types/index.ts';
84
import isRenderFunction from '../isRenderFunction.ts';
95
import { ensureReactUseAvailable } from '../reactApis.cts';
106
import { createRSCProvider } from '../RSCProvider.tsx';

node_package/src/wrapServerComponentRenderer/server.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ const wrapServerComponentRenderer = (componentOrRenderFunction: ReactComponentOr
4646
getServerComponent: getReactServerComponent,
4747
// Server-side rendering processes each component in isolation during separate requests,
4848
// eliminating the possibility of cache key conflicts between component instances.
49-
// Therefore, we can safely use an empty string as the domNodeId parameter.
49+
// Therefore, we can safely use `server` as the domNodeId parameter.
5050
createRSCPayloadKey: (componentName, componentProps) =>
51-
createRSCPayloadKey(componentName, componentProps, ''),
51+
createRSCPayloadKey(componentName, componentProps, 'server'),
5252
});
5353

5454
return () => (

0 commit comments

Comments
 (0)