Skip to content

What is the purpose of the .txt files generated for each route? #59394

Answered by davetapley
woutrbe asked this question in Help
Discussion options

You must be logged in to vote

It's a React Server Component Payload:

The RSC Payload is a compact binary representation of the rendered React Server Components tree. It's used by React on the client to update the browser's DOM. The RSC Payload contains:

  • The rendered result of Server Components
  • Placeholders for where Client Components should be rendered and references to their JavaScript files
  • Any props passed from a Server Component to a Client Component

It used to be called index.rsc but was renamed to .txt in af8963d, for reasons which aren't given (@styfle?).

They started appearing after upgrading to router because of (AFAICT): b590ec3

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@styfle
Comment options

@jeetparikh
Comment options

@styfle
Comment options

@jeetparikh
Comment options

@giteshraheja
Comment options

Answer selected by styfle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants