This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-30
Channels
- # bangalore-clj (1)
- # beginners (23)
- # boot (1)
- # cider (23)
- # cljsjs (2)
- # cljsrn (4)
- # clojure (251)
- # clojure-dusseldorf (2)
- # clojure-gamedev (23)
- # clojure-italy (5)
- # clojure-russia (53)
- # clojure-sanfrancisco (5)
- # clojure-spec (7)
- # clojure-uk (66)
- # clojurescript (169)
- # community-development (21)
- # core-async (10)
- # cursive (15)
- # data-science (1)
- # datomic (7)
- # docker (1)
- # emacs (24)
- # events (1)
- # funcool (6)
- # hoplon (24)
- # liberator (1)
- # luminus (6)
- # lumo (62)
- # mount (7)
- # off-topic (1)
- # om (12)
- # om-next (5)
- # onyx (14)
- # overtone (2)
- # pedestal (58)
- # powderkeg (27)
- # protorepl (1)
- # re-frame (1)
- # ring-swagger (16)
- # rum (51)
- # spacemacs (25)
- # uncomplicate (7)
- # unrepl (22)
- # untangled (7)
- # yada (109)
Hey I know this has been answered before but I seem to be unable to search for it in Gitter.
Just wondering how I can do "netlify" true
or something to that effect. I simply just need to set netlify
as an attribute the same way as you would allowfullscreen
etc.
I previously did this by just setting everything as dangerously setting HTML but I would much prefer to do this the right way.
I've opened an issue for this. As it is getting rather painful to work with 😞 https://github.com/tonsky/rum/issues/129
@grounded_sage is there anyway you can set it to something like data-netlify
@misha good point, it doesn't seem to support it for now. They have something called dataset
@grounded_sage my bad
this issue thread is a loooong one: https://github.com/facebook/react/issues/140
I know that tonsky said that they should say data-
but netlify doesn't do that 😕
Oh god. So I can't even use data- ...
Because I was planning to use Snipcart for e-commerce
@misha interesting
DOMProperty.injectDOMPropertyConfig({
Properties: { amp: DOMProperty.MUST_USE_ATTRIBUTE },
isCustomAttribute: attributeName => attributeName.startsWith('amp-')
})
Surely I can still use snipcart. They have tutorials online with React 😕 Anyways that is rather painful. Mega sad face
@grounded_sage you can try something like this
ReactDOM.findDOMNode(this.test).setAttribute('custom-attribute', 'some value');
I do server side rendered as well.
So that could be more of an issue 😕
Does it generate the html with the custom netlify attribute you mean?
I can assume that netlify only works in javascript env, not on server side. So basically your form being rendered on server ( without netlify of course ) and client ( before netlify transforms the form ) are the same ?
I need to comment out the dangerous setting to check
rum does not use react on server, afaik. so your attribute will come through. Now the challenge is to register it in react
Yea I saw one of his talks where he said it's just CLJ and does all the mapping as best as possible
Have you actually tried if data-netflify
works? I'd be very surprising, data-*
has been a standard for a few years now. People shouldn't make up their own attributes
I will give it a go @rauh
@misha it does indeed work serverside. So I guess I can just hack at it client side to get it to work 😕
Though will try with data-
first.
@grounded_sage check their javascript source code. They shouldn't make up their own attribute.
Might be easier to hammer it on Netlify's end
since reactinjcetion is around for 2+ years, I think this is the way to go (if data-
is not an option in some cases)
Thanks I've screenshotted to reference later. Man I am experiencing some weird shit atm. Throwing up the page on netlify and the attribute isn't present but a method="post" is. When locally the generated html is how I want. 😕 My other side worked fine. So frustrating 😞
so yeah, this is the way to go:
DOMProperty.injectDOMPropertyConfig({
Properties: { amp: DOMProperty.MUST_USE_ATTRIBUTE },
isCustomAttribute: attributeName => attributeName.startsWith('amp-')
})
just need a function to make it pretty in cljs@rauh @nxqd seems that data-netlify doesn't work for me? So strange
@grounded_sage Would be interested if misha's approach works