Skip to content

Commit

Permalink
cleanup ReactNoopServer
Browse files Browse the repository at this point in the history
  • Loading branch information
gnoff committed May 27, 2022
1 parent fc76c7f commit 277beb8
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions packages/react-noop-renderer/src/ReactNoopServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,18 @@ const ReactNoopServer = ReactFizzServer({
return null;
},

pushTextInstance(target: Array<Uint8Array>, text: string): void {
pushTextInstance(
target: Array<Uint8Array>,
text: string,
responseState: ResponseState,
textEmbedded: boolean,
): boolean {
const textInstance: TextInstance = {
text,
hidden: false,
};
target.push(Buffer.from(JSON.stringify(textInstance), 'utf8'), POP);
return false;
},
pushStartInstance(
target: Array<Uint8Array>,
Expand All @@ -128,7 +134,13 @@ const ReactNoopServer = ReactFizzServer({
target.push(POP);
},

pushSegmentFinale() {},
// This is a noop in ReactNoop
pushSegmentFinale(
target: Array<Uint8Array>,
responseState: ResponseState,
lastPushedText: boolean,
textEmbedded: boolean,
): void {},

writeCompletedRoot(
destination: Destination,
Expand Down

0 comments on commit 277beb8

Please sign in to comment.