Skip to content
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

React Server Components integration #211

Open
delneg opened this issue Dec 27, 2020 · 2 comments
Open

React Server Components integration #211

delneg opened this issue Dec 27, 2020 · 2 comments

Comments

@delneg
Copy link
Contributor

delneg commented Dec 27, 2020

Recently, a new RFC was published called React Server Components, which brings a new life to "do it on the server" approach.
Related links:
https://github.com/reactjs/server-components-demo
https://www.youtube.com/watch?v=TQQPAU21ZUw
https://github.com/josephsavona/rfcs/blob/server-components/text/0000-server-components.md

I've got some questions to ask Fable team:

  1. Is an integration of this approach possible ?
  2. How hard is it to do so, if it is ?
  3. What can be the benefits of using RSC ?
  4. Can it possible be combined with Fable.Remoting and / or use a similar approach to have F# client + server, with zero-cost bundles and type-safe client-server communicationg ?
  5. Any other thoughts on the topic, etc.
@alfonsogarciacaro
Copy link
Member

TBH I've only read very briefly about React Server Components so I'm not sure. But I'm assuming this is only for node.js servers? If that's the case, I think it will be difficult because, although some devs use Fable to write node servers, most of F# devs use dotnet on the server side (if my intuition is correct). The most popular F# servers already can generate HTML. If the idea of having components that look like client components but are rendered on the server (is that the mechanism?) catches on, we'll probably need to develop our own solution that's compatible both with dotnet and Fable.

@delneg
Copy link
Contributor Author

delneg commented Dec 28, 2020

First of all, please take time to look into this feature in detail - it's all about sending JSON (or possibly any other structured data format) between server and client during server rending, instead of HTML (as of right now in SSR).
The concept is similar as if we were sending Elmish model, processed by a mailbox on the server to mailbox on the client.
And yes, i was talking about .NET backends mainly, not node.js backends

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants