On Wednesday, January 11, 2017 at 4:36:47 AM UTC, Jen-Mei Wu wrote:
>
> On Monday, January 9, 2017 at 7:32:56 AM UTC-8, Rupert Smith wrote:
>>
>> A wee problem with this. I don't see how a page can be partially rendered 
>> server side then passed to the client to complete, when using a virtual 
>> dom. Suppose for example that my pages are running with Main.fullscreen(), 
>> I can't just take the DOM that was rendered on the server, set it up as the 
>> virtual dom, and then have the client make changes to it as deltas to the 
>> DOM. I could just delete all of the server rendered DOM and replace it with 
>> the client rendered one through ELM, but you will see the screen blink as 
>> this happens.
>>
>
> Sorry to hear this. Was hoping there was a way to generate Virtual DOM 
> compatible HTML on the server side (a la ReactDOMServer.renderToString). 
> Does anyone know if there's a particularly difficult hurdling block for 
> this or if it's just a thing that no one has gotten around to because it 
> hasn't been important enough for anyone yet?
>

>From the React docs:

"If you call ReactDOM.render() on a node that already has this 
server-rendered markup, React will preserve it and only attach event 
handlers, allowing you to have a very performant first-load experience."

How does React know that a node has been server rendered? Is there some 
special attribute set on it to indicate this?

I'm guessing the idea just hasn't been explored in Elm yet. Perhaps with a 
little hacking on Elms virtual dom code it can be done.

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to