react/packages/react-server-dom-turbopack
Sebastian Markbåge e81fcfe3f2
[Flight] Expose registerServerReference from the client builds (#32534)
This is used to register Server References that exist in the current
environment but also exists in the server it might call into. Such as a
remote server.

If the value comes from the remote server in the first place then this
is called automatically to ensure that you can pass a reference back to
where it came from - even if the `serverModuleMap` option is used. This
was already the case when `serverModuleMap` wasn't passed. This is how
you can pass server references back to the server. However, when we
added `serverModuleMap` that pass was skipped because we were getting
real functions instead of proxies.

For functions that wasn't yet passed from the remote server to the
current server, we can register them eagerly just like we do for
`import('/server').registerServerReference()`. You can now also do this
with `import('/client').registerServerReference()`. We could make them
shared so you only have to do this once but it might not be possible to
pass to the remote server and the remote server might not even be the
same RSC renderer. Therefore I split them. It's up to the compiler
whether it should do that or not. It has to know that any function you
might call might be able to receive it. This is currently global to a
specific RSC renderer.
2025-03-05 22:16:56 -05:00
..
npm [Flight] Support streaming of decodeReply in Edge environments (#31852) 2024-12-19 12:54:59 -05:00
src [Flight] Expose registerServerReference from the client builds (#32534) 2025-03-05 22:16:56 -05:00
client.browser.js [Flight] reorganize code for forked entrypoints (#30702) 2024-08-14 18:10:40 -07:00
client.edge.js [Flight] reorganize code for forked entrypoints (#30702) 2024-08-14 18:10:40 -07:00
client.js [Flight] Implement react-server-dom-turbopack (#27315) 2023-09-27 10:03:57 -07:00
client.node.js [Flight] reorganize code for forked entrypoints (#30702) 2024-08-14 18:10:40 -07:00
index.js [Flight] Implement react-server-dom-turbopack (#27315) 2023-09-27 10:03:57 -07:00
package.json Bump next prerelease version numbers (#31676) 2024-12-12 14:10:46 -05:00
README.md [Flight] Implement react-server-dom-turbopack (#27315) 2023-09-27 10:03:57 -07:00
server.browser.js [Flight] reorganize code for forked entrypoints (#30702) 2024-08-14 18:10:40 -07:00
server.edge.js [Flight] Support streaming of decodeReply in Edge environments (#31852) 2024-12-19 12:54:59 -05:00
server.js [Flight] Implement react-server-dom-turbopack (#27315) 2023-09-27 10:03:57 -07:00
server.node.js [Flight] reorganize code for forked entrypoints (#30702) 2024-08-14 18:10:40 -07:00
static.browser.js [Flight] rename prerender to unstable_prerender and include in stable channel (#31724) 2024-12-10 11:51:39 -08:00
static.edge.js [Flight] rename prerender to unstable_prerender and include in stable channel (#31724) 2024-12-10 11:51:39 -08:00
static.js [Flight] Implement prerender (#30686) 2024-08-15 14:28:28 -07:00
static.node.js [Flight] rename prerender to unstable_prerender and include in stable channel (#31724) 2024-12-10 11:51:39 -08:00

react-server-dom-turbopack

Experimental React Flight bindings for DOM using Turbopack.

Use it at your own risk.