next.js
316c0629 - [dev] Define request ID for RSC requests on the client (#84605)

Commit
310 days ago
[dev] Define request ID for RSC requests on the client (#84605) Previously, we defined a request ID for RSC requests on the server. The request ID is used to tag debug information sent via WebSocket to the client, which then routes those chunks to the debug channel associated with this ID. However, this meant that the client had to await the server response to retrieve the request ID from the response headers, before we could pass the response (and the debug channel) to React. For #84580, we want to pass the response promise directly to React, to accurately show timing information about the request in the React DevTools. To achieve this, we now define the request ID on the client, and send it to the server via a request header. This means that the client can create the debug channel immediately, without waiting for the server response. closes NAR-426
Author
Parents
Loading