Fork me on GitHub
#hoplon
<
2016-10-07
>
thedavidmeister05:10:39

hey, is there some way to respond to an element being rendered?

thedavidmeister05:10:53

so i can avoid attempting to interact with it before it is ready

thedavidmeister05:10:32

i’m currently trying things like [(div “foo”) (script :load #(reset! ready? true))] but it doesn’t feel like the best solution

thedavidmeister06:10:12

that doesn’t even work anyway 😞

thedavidmeister07:10:42

something like this maybe?

thedavidmeister07:10:45

(let [ready? (j/cell= nil)])
  (h/with-timeout 0 (reset! ready? true))
  (j/cell= (when ready? ...))
  (h/div "foo”)

dm312:10:27

@flyboarder @micha - someone else tackled the Clojurescript bound-fn problem too in a similar way: https://github.com/binaryage/cljs-zones

alandipert13:10:27

oh cool - yeah , looks like same technique

dm313:10:23

probably more performant, however who knows

dm313:10:52

needs another layer to transparently handle all vars as the hoplon version does

flyboarder14:10:45

Very interesting!

micha16:10:43

yeah i went back and forth with that, in the end chose the transparent way even if it's not as efficient

adamfrey17:10:45

@alandipert @micha I ran into the javelin bug again I described a couple days ago so I made a minimal repro case: https://github.com/AdamFrey/javelin-bug

adamfrey17:10:57

sorry, probably didn’t need to have @-ed you on both that

micha18:10:07

awesome thanks!

micha18:10:14

i'll check it out this afternoon

vigilancetech19:10:37

cool! Hoplon/ui could use an authoring tool like this at some point when the API settles down: https://www.kickstarter.com/projects/298226251/subform-a-modern-tool-for-digital-product-designer

flyboarder20:10:53

@vigilancetech I was looking at something like that, it wouldn't need to wait for hoplon/ui at all, something similar to https://polymer-designer.appspot.com/