Fork me on GitHub
#rum
<
2016-12-23
>
tonsky10:12:01

how does netlify works? does it mess with the DOM?

tonsky10:12:59

does it work with raw React.js at all?

grounded_sage12:12:32

Netlify simply hosts the sites on a CDN. It renders static websites built in anything including react each time you do a git push. They have one built in api with their service for form handling as generally that is all websites need that are primarily static. It simply requires that netlify attribute and then setting up what the form does in the settings.

grounded_sage12:12:36

This is their features page. A quick skim will give you a good idea https://www.netlify.com/features/

tonsky12:12:05

so what was the result of [:form {:netlify true}]?

tonsky12:12:12

did something rendered?

tonsky12:12:21

was attribute there? or missing?

tonsky12:12:41

I remember React used to whitelist attributes, don’t know if they still do it

tonsky12:12:24

to be standards-compliant, it should be data-netlify at least, but that’s the question to Netlify engineers, really

grounded_sage13:12:08

I see. Still there is a hidden attribute in html. Also just noticed novalidate in mailchimp when I just added it now.

<div id=\"mc_embed_signup\">
<form action=\"//veganbusinessnetwork.us13.list-manage.com/subscribe/post?u=3e449a3b219823344ae7ae47a&amp;id=a3633bf54c\" method=\"post\" id=\"mc-embedded-subscribe-form\" name=\"mc-embedded-subscribe-form\" class=\"validate\" target=\"_blank\" novalidate> ....

grounded_sage13:12:23

The attribute was missing

grounded_sage13:12:31

To answer your earlier question

tonsky13:12:03

were you doing client-side rendering or server-side?

grounded_sage13:12:35

I'm doing server rendered and then transformed into an SPA client side.

grounded_sage13:12:38

I render it serverside inside the boot pipeline and then serve up the js at the end of the body to take over client side

tonsky13:12:57

was attribute missing in server markup as well?

misha14:12:55

for what it's worth: try [:form {"netlify" true}]

grounded_sage14:12:59

I believe it was. I played around with it a little bit and eventually gave up and went for set inner HTML. Thanks Misha that is probably a better for things like this. I'm officially having a break now so won't look at this again until the new year. I'm starting doing web consulting in Rum doing these kinds of sites next year so will need to get to the bottom of it and will likely be poking around the Rum community a lot.