top | item 29313378

(no title)

Grimm1 | 4 years ago

I get that I can run this as a SPA, but then don't I lose out on the prerendered HTML fetched from the server? That's what I mean by isometric with Node.

discuss

order

kall|4 years ago

Well you could run it as a sort of rendering layer in front of your backend, and talk to your phoenix app on an internal API or local socket. May not be worth it though. Unlike next, I don‘t think you can even run this as SPA only.

I think for remix to be able to do what it does, it kind of needs to run as a JS (not node!) backend, because a big part of it is running react on the server. Also, you are literally writing the server and client code in the same file. Closure and Reason which have strong react ports/bindings might be able to do it, but otherwise I don‘t see how.

What other backends need is probably a totally different framework, that wraps up a react server renderer with native language bindings. Might be neat, but totally different.

couchand|4 years ago

I think the term is "isomorphic", as in having a single form.

Grimm1|4 years ago

Ah yup you are definitely correct, that is what I meant.

arcturus17|4 years ago

Why don’t you just return JSON from the server?

I agree with you in the sense that I don’t want to write server code in Node since I like batteries-included frameworks (Django)…

I guess you’re talking about features like form validation and whatnot?