Skip to content

Commit 277beb8

Browse files
committed
cleanup ReactNoopServer
1 parent fc76c7f commit 277beb8

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

packages/react-noop-renderer/src/ReactNoopServer.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,18 @@ const ReactNoopServer = ReactFizzServer({
9898
return null;
9999
},
100100

101-
pushTextInstance(target: Array<Uint8Array>, text: string): void {
101+
pushTextInstance(
102+
target: Array<Uint8Array>,
103+
text: string,
104+
responseState: ResponseState,
105+
textEmbedded: boolean,
106+
): boolean {
102107
const textInstance: TextInstance = {
103108
text,
104109
hidden: false,
105110
};
106111
target.push(Buffer.from(JSON.stringify(textInstance), 'utf8'), POP);
112+
return false;
107113
},
108114
pushStartInstance(
109115
target: Array<Uint8Array>,
@@ -128,7 +134,13 @@ const ReactNoopServer = ReactFizzServer({
128134
target.push(POP);
129135
},
130136

131-
pushSegmentFinale() {},
137+
// This is a noop in ReactNoop
138+
pushSegmentFinale(
139+
target: Array<Uint8Array>,
140+
responseState: ResponseState,
141+
lastPushedText: boolean,
142+
textEmbedded: boolean,
143+
): void {},
132144

133145
writeCompletedRoot(
134146
destination: Destination,

0 commit comments

Comments
 (0)