Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/react-client/src/__tests__/ReactFlight-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1957,8 +1957,8 @@ describe('ReactFlight', () => {
});
expect(ReactNoop).toMatchRenderedOutput(
<>
<div prop=":S1:" />
<div prop=":S2:" />
<div prop="«S1»" />
<div prop="«S2»" />
</>,
);
});
Expand All @@ -1981,8 +1981,8 @@ describe('ReactFlight', () => {
});
expect(ReactNoop).toMatchRenderedOutput(
<>
<div prop=":fooS1:" />
<div prop=":fooS2:" />
<div prop="«fooS1»" />
<div prop="«fooS2»" />
</>,
);
});
Expand Down Expand Up @@ -2021,8 +2021,8 @@ describe('ReactFlight', () => {
assertLog(['ClientDoubler']);
expect(ReactNoop).toMatchRenderedOutput(
<>
<div prop=":S1:">:S1:</div>
<div prop=":S1:">:S1:</div>
<div prop="«S1»">«S1»</div>
<div prop="«S1»">«S1»</div>
</>,
);
});
Expand Down
8 changes: 7 additions & 1 deletion packages/react-server/src/ReactFlightHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,13 @@ function useId(): string {
}
const id = currentRequest.identifierCount++;
// use 'S' for Flight components to distinguish from 'R' and 'r' in Fizz/Client
return ':' + currentRequest.identifierPrefix + 'S' + id.toString(32) + ':';
return (
'\u00AB' +
currentRequest.identifierPrefix +
'S' +
id.toString(32) +
'\u00BB'
);
}

function use<T>(usable: Usable<T>): T {
Expand Down
Loading