Skip to content

Commit

Permalink
lints and gates
Browse files Browse the repository at this point in the history
  • Loading branch information
gnoff committed May 31, 2022
1 parent aa490a3 commit d72d44d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/react-client/src/__tests__/ReactFlight-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,16 +564,15 @@ describe('ReactFlight', () => {
);
});

// @gate enableServerContext
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 () => {
// @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
// 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
// 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
// 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
// we just accept that it is a nuance of useId in Flight
function App() {
let id = React.useId();
let div = <div prop={id}>{id}</div>;
const id = React.useId();
const div = <div prop={id}>{id}</div>;
return <ClientDoublerModuleRef el={div} />;
}

Expand Down

0 comments on commit d72d44d

Please sign in to comment.