-
Notifications
You must be signed in to change notification settings - Fork 47.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Flight] Fix reference
param type in registerServerReference
#27688
[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 - facebook/react#28333 - facebook/react#28334 - facebook/react#28378 - facebook/react#28377 - facebook/react#28376 - facebook/react#28338 - facebook/react#28331 - facebook/react#28336 - facebook/react#28320 - facebook/react#28317 - facebook/react#28375 - facebook/react#28367 - facebook/react#28380 - facebook/react#28368 - facebook/react#28343 - facebook/react#28355 - facebook/react#28374 - facebook/react#28362 - facebook/react#28344 - facebook/react#28339 - facebook/react#28353 - facebook/react#28346 - facebook/react#25790 - facebook/react#28352 - facebook/react#28326 - facebook/react#27688 - facebook/react#28329 - facebook/react#28332 - facebook/react#28340 - facebook/react#28327 - facebook/react#28325 - facebook/react#28324 - facebook/react#28309 - facebook/react#28310 - facebook/react#28307 - facebook/react#28306 - facebook/react#28315 - facebook/react#28318 - facebook/react#28226 - facebook/react#28308 - facebook/react#27563 - facebook/react#28297 - facebook/react#28286 - facebook/react#28284 - facebook/react#28275 - facebook/react#28145 - facebook/react#28301 - facebook/react#28224 - facebook/react#28152 - facebook/react#28296 - facebook/react#28294 - facebook/react#28279 - facebook/react#28273 - facebook/react#28269 - facebook/react#28376 - facebook/react#28338 - facebook/react#28331 - facebook/react#28336 - facebook/react#28320 - facebook/react#28317 - facebook/react#28375 - facebook/react#28367 - facebook/react#28380 - facebook/react#28368 - facebook/react#28343 - facebook/react#28355 - facebook/react#28374 - facebook/react#28362 - facebook/react#28344 - facebook/react#28339 - facebook/react#28353 - facebook/react#28346 - facebook/react#25790 - facebook/react#28352 - facebook/react#28326 - facebook/react#27688 - facebook/react#28329 - facebook/react#28332 - facebook/react#28340 - facebook/react#28327 - facebook/react#28325 - facebook/react#28324 - facebook/react#28309 - facebook/react#28310 - facebook/react#28307 - facebook/react#28306 - facebook/react#28315 - facebook/react#28318 - facebook/react#28226 - facebook/react#28308 - facebook/react#27563 - facebook/react#28297 - facebook/react#28286 - facebook/react#28284 - facebook/react#28275 - facebook/react#28145 - facebook/react#28301 - facebook/react#28224 - facebook/react#28152 - facebook/react#28296 - facebook/react#28294 - facebook/react#28279 - facebook/react#28273 - facebook/react#28269 Closes NEXT-2542 Disable ppr test for strict mode for now, @acdlite will check it and we'll sync again
…ebook#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
reference
that is passed intoregisterServerReference
can be a plain function. It does not need to have the three additonal properties of aServerRefeference
. In fact, adding these properties (plusbind
) is precisely whatregisterServerReference
does.