3 ms·
I started with this line: >initial rendering should definitely be on the server this technique is called pre-rendering, and yes, I am amazed people don't do i
by lennel 13y ago
I started with this line:
>initial rendering should definitely be on the server
this technique is called pre-rendering, and yes, I am amazed people don't do it.
"PyExecJS (which just uses raw JavaScriptCore)."
this seems pretty slow or can you cache the execution function. (aka you don't have to parse the js multiple times)
Our backend is jvm so we decided on closure, with this on startup we compile our templates on the server and then pass the rendering functions around pumping the data into it to render initial pages.
At the same time, we compile the same templates into javascript functions which are included into our app via the closure dependency system to render on the client.
This has the advantage of not having to parse and "compile" a template at the point of delivery.
This is why I think react is an excellent library, because it allows anybody to do this and brings this notion into the minds of developers who jump easily on bandwagons.
I also think that the react team are well on their way to building a library which would fair excellently under all sorts of static analysis
- peterhunt 13y agoPyExecJS is slow :) We are actively working on more static analysis tools for React: it's certainly one of our major priorities.
- lennel 13y agoi assume you work on the team at FB. Are you considering writing jsx compilers for platforms like the jvm?
- peterhunt 13y agoOur approach is going to make js interop performant with our stack (which is not jvm). We don't have a concrete plan at this time. You would need more than jsx to make this work through (jsx is just sugar)
- swah 13y agoI suppose Rhino can also be used? :)
- lennel 13y agowe use rhino for some types of testing. brutally slow.