On Wednesday, January 11, 2017 at 9:43:03 AM UTC, Rupert Smith wrote:
>
> How does React know that a node has been server rendered? Is there some 
> special attribute set on it to indicate this?
>
 
Actually, there is a clue in the following docs for renderToStaticMarkup():

"Similar to renderToString, except this doesn't create extra DOM attributes 
such as data-reactid, that React uses internally. This is useful if you 
want to use React as a simple static page generator, as stripping away the 
extra attributes can save lots of bytes."

So I guess it inserts a data-reactid atrtibute on the node, and the vitual 
dom rendering code uses that to know how to treat it differently.

-- 
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