[Flight] Fix reference param type in registerServerReference#27688
Conversation
|
Comparing: 6c7b41d...bbc6c29 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
28f709e to
0888c90
Compare
The `reference` that is passed into `registerServerReference` can be a plain function. It does not need to have the three additonal properties of a `ServerRefeference`. In fact, adding these properties (plus `bind`) is precisely what `registerServerReference` does.
0888c90 to
bbc6c29
Compare
|
I think this is still valid, even with #28343. |
|
It technically shouldn't even be limited to Functions. It technically should be possible to export any object from a |
|
There's a static typing thing here that comes into play and is not fully thought out yet. Really types should be enforced at the "use client" / "use server" boundaries so you should not be able to annotate something that is non-serializable as an argument across the boundary. This can be enforced by the list of types we know are allowed to pass. However, |
|
Yeah, this was more meant from a framework's/bundler's perspective. When implementing the bundling part that generates the |
### React upstream changes - react/react#28333 - react/react#28334 - react/react#28378 - react/react#28377 - react/react#28376 - react/react#28338 - react/react#28331 - react/react#28336 - react/react#28320 - react/react#28317 - react/react#28375 - react/react#28367 - react/react#28380 - react/react#28368 - react/react#28343 - react/react#28355 - react/react#28374 - react/react#28362 - react/react#28344 - react/react#28339 - react/react#28353 - react/react#28346 - react/react#25790 - react/react#28352 - react/react#28326 - react/react#27688 - react/react#28329 - react/react#28332 - react/react#28340 - react/react#28327 - react/react#28325 - react/react#28324 - react/react#28309 - react/react#28310 - react/react#28307 - react/react#28306 - react/react#28315 - react/react#28318 - react/react#28226 - react/react#28308 - react/react#27563 - react/react#28297 - react/react#28286 - react/react#28284 - react/react#28275 - react/react#28145 - react/react#28301 - react/react#28224 - react/react#28152 - react/react#28296 - react/react#28294 - react/react#28279 - react/react#28273 - react/react#28269 - react/react#28376 - react/react#28338 - react/react#28331 - react/react#28336 - react/react#28320 - react/react#28317 - react/react#28375 - react/react#28367 - react/react#28380 - react/react#28368 - react/react#28343 - react/react#28355 - react/react#28374 - react/react#28362 - react/react#28344 - react/react#28339 - react/react#28353 - react/react#28346 - react/react#25790 - react/react#28352 - react/react#28326 - react/react#27688 - react/react#28329 - react/react#28332 - react/react#28340 - react/react#28327 - react/react#28325 - react/react#28324 - react/react#28309 - react/react#28310 - react/react#28307 - react/react#28306 - react/react#28315 - react/react#28318 - react/react#28226 - react/react#28308 - react/react#27563 - react/react#28297 - react/react#28286 - react/react#28284 - react/react#28275 - react/react#28145 - react/react#28301 - react/react#28224 - react/react#28152 - react/react#28296 - react/react#28294 - react/react#28279 - react/react#28273 - react/react#28269 Closes NEXT-2542 Disable ppr test for strict mode for now, @acdlite will check it and we'll sync again
…ct#27688) The `reference` that is passed into `registerServerReference` can be a plain function. It does not need to have the three additonal properties of a `ServerRefeference`. In fact, adding these properties (plus `bind`) is precisely what `registerServerReference` does.
) The `reference` that is passed into `registerServerReference` can be a plain function. It does not need to have the three additonal properties of a `ServerRefeference`. In fact, adding these properties (plus `bind`) is precisely what `registerServerReference` does. DiffTrain build for commit 9268672.
The
referencethat is passed intoregisterServerReferencecan be a plain function. It does not need to have the three additonal properties of aServerRefeference. In fact, adding these properties (plusbind) is precisely whatregisterServerReferencedoes.