Fork me on GitHub
#reagent
<
2015-09-18
>
zane03:09:10

@gstamp: I don't know if you're looking to switch your testing setup, but I can heartily recommend lein doo.

zane03:09:17

It's the first thing that's actually worked well for me.

gstamp03:09:10

@zane: Thanks. I will definitely look into it. I was mainly on clojurescript.test because reagent template used it by default but the Clojurescript testing landscape seems to have moved on.

danielgrosse08:09:08

Hello, I want to render a svg file as reagent data structure. I load i into an core.async channel and parse it with hickory to get it as hiccup style format. After that I mount the result into my component. But i only renders some numbers, but no content.

danielgrosse08:09:42

When I print the result to the console and copy it into the component, it works fine. What have I overseen?

mikethompson12:09:37

@danielgrosse: when asking a question please attempt to state the problem as clearly and minimally as possible. I find what you say above a bit confusing: an SVG file will be full of svg elements like <line ...> and <g ...>. Are you saying that the contents of an SVG file is passed via core.async (as a string?) and then parsed by hickory and then mounted (how?) into a component?? Happy to help, but we'll need to see a minimal gist. I'd got a feeling that core.async is not really any part of the problem. You just want to know how to turn a string containing SVG into something you can render in a component???

quantisan15:09:11

I'm using reagent-template's way of routing. I'm trying to redirect a hash but find that I need to do an extra session/put! like so:

(defroute "/" [] (do (session/put! :current-page #'main-production-page)
                     (set-hash! "/production")))
(defroute "/production" [] (session/put! :current-page #'main-production-page))

quantisan15:09:59

if I just do set-hash! the page doesn't load

quantisan15:09:12

anyone seen this before?

quantisan16:09:16

refactored my current-page dispatch and it's working now

luposlip21:09:06

👍:skin-tone-4:

luposlip21:09:59

Can you share the refactored code?