Skip to content

Commit 7d45d41

Browse files
Romex91Judahmeek
authored andcommitted
nits
1 parent ff0ba72 commit 7d45d41

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

node_package/src/ReactOnRails.full.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,19 @@ import type {
99
import Client from './ReactOnRails.client';
1010

1111
if (typeof window !== 'undefined') {
12-
console.warn('Optimization opportunity: "react-on-rails" includes server-rendering code. Browser may not need it. See https://forum.shakacode.com/t/how-to-use-different-versions-of-a-file-for-client-and-server-rendering/1352 (requires sign in)');
12+
console.log('ReactOnRails: Optimization opportunity: "react-on-rails" includes server-rendering code. Browser may not need it. See https://forum.shakacode.com/t/how-to-use-different-versions-of-a-file-for-client-and-server-rendering/1352 (requires sign in)');
1313
}
1414

15+
/**
16+
* Used by Rails to catch errors in rendering
17+
* @param options
18+
*/
1519
Client.handleError = (options: ErrorOptions): string | undefined => handleError(options);
20+
21+
/**
22+
* Used by server rendering by Rails
23+
* @param options
24+
*/
1625
Client.serverRenderReactComponent = (options: RenderParams): null | string | Promise<RenderResult> => serverRenderReactComponent(options);
1726

1827
export * from "./types";

0 commit comments

Comments
 (0)