Skip to content

Commit d72d44d

Browse files
committed
lints and gates
1 parent aa490a3 commit d72d44d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/react-client/src/__tests__/ReactFlight-test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,16 +564,15 @@ describe('ReactFlight', () => {
564564
);
565565
});
566566

567-
// @gate enableServerContext
568567
it('[TODO] it does not warn if you render a server element passed to a client module reference twice on the client when using useId', async () => {
569568
// @TODO Today if you render a server component with useId and pass it to a client component and that client component renders the element in two or more
570569
// places the id used on the server will be duplicated in the client. This is a deviation from the guarantees useId makes for Fizz/Client and is a consequence
571570
// of the fact that the server component is actually rendered on the server and is reduced to a set of host elements before being passed to the Client component
572571
// so the output passed to the Client has no knowledge of the useId use. In the future we would like to add a DEV warning when this happens. For now
573572
// we just accept that it is a nuance of useId in Flight
574573
function App() {
575-
let id = React.useId();
576-
let div = <div prop={id}>{id}</div>;
574+
const id = React.useId();
575+
const div = <div prop={id}>{id}</div>;
577576
return <ClientDoublerModuleRef el={div} />;
578577
}
579578

0 commit comments

Comments
 (0)