This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-13
Channels
- # admin-announcements (1)
- # beginners (53)
- # boot (355)
- # braid-chat (4)
- # cider (15)
- # cljsjs (3)
- # clojure (88)
- # clojure-austin (1)
- # clojure-new-zealand (4)
- # clojure-russia (46)
- # clojure-uk (7)
- # clojurescript (61)
- # component (2)
- # cursive (3)
- # data-science (5)
- # datomic (6)
- # dirac (49)
- # editors (8)
- # emacs (15)
- # funcool (15)
- # jobs (1)
- # ldnclj (10)
- # melbourne (1)
- # off-topic (14)
- # om (61)
- # om-next (2)
- # onyx (32)
- # re-frame (28)
- # reagent (19)
- # test200 (1)
- # vim (3)
To whomever who cares: I just updated my blog post on Reagent clientside routing using Bidi and Accountant to use multimethods for the dispatching: https://pez.github.io/2016/03/01/Reagent-clientside-routing-with-Bidi-and-Accountant.html
@lsenta: Probably React just doesn't support it. Did you look at https://facebook.github.io/react/docs/tags-and-attributes.html ?
React 0.14 supports additional SVG attributes and tags, not sure if that helps. React 0.14 requires Reagent 0.6-alpha.
@nidu @juhoteperi Thanks guys, that explain what's happening. Weird to learn that react just ignore field it does not know, I need to look at the internals.
I'm trying to use form-3 components and set my attributes in the component-did-mount
to bypass that, see http://stackoverflow.com/questions/31666274/creating-a-line-with-an-arrow-in-react
Do you have any idea/examples on how to do that? I'm not sure how to retrieve the node in the component-did-mount
function
In SO they do something like:
var markerNode = React.findDOMNode(this.refs.marker)
var markerEndNode = React.findDOMNode(this.refs.markerEndNode)
What would be the reagent equivalent?(r/dom-node this)
Reagent doesn't have refs so you need to use normal DOM operations if you need to select children elements (getElementsByTagName or such)
@juhoteperi That was easy, thanks for the help!
@lsenta: not sure how to do it properly but i just embedded plain html with dangerouslySetInnerHTML
. Moreover in my cases svg defs change rarely.
React 15.0.0-rc.1 is now available in Clojars and it should support all SVG tags and attributes. Quick check shows that Reagent app loads okay with it.
I don't have code to check SVG stuff.