This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-15
Channels
- # admin-announcements (2)
- # beginners (93)
- # boot (34)
- # capetown (1)
- # cider (15)
- # cljs-dev (30)
- # cljsjs (9)
- # clojars (8)
- # clojure (199)
- # clojure-austin (3)
- # clojure-france (3)
- # clojure-greece (2)
- # clojure-italy (46)
- # clojure-quebec (7)
- # clojure-russia (2)
- # clojure-spec (76)
- # clojure-uk (16)
- # clojurescript (43)
- # core-async (7)
- # cursive (14)
- # data-science (1)
- # datascript (4)
- # datomic (3)
- # devcards (60)
- # editors (5)
- # funcool (5)
- # garden (3)
- # hoplon (32)
- # immutant (22)
- # jobs (1)
- # lein-figwheel (21)
- # leiningen (1)
- # mental-health (11)
- # mount (2)
- # off-topic (6)
- # om (16)
- # onyx (15)
- # re-frame (43)
- # reagent (20)
- # rum (18)
- # specter (37)
- # sql (2)
- # testing (8)
- # untangled (7)
- # yada (19)
People definitely seem to wonder how to use re-frame with devcards: https://github.com/Day8/re-frame-template/issues/28 https://github.com/bhauman/devcards/issues/105
I am having trouble using both the dom-node and defcard-om-next helpers with an om-next component. They don't render with the notification Card has not mounted DOM node.
@bbss: if you’re using defcard-om-next
in Devcards itself you might want to consider using https://github.com/anmonteiro/devcards-om-next
it provides the same helpers (`defcard-om-next` and om-next-root
) with support for reloadable code
(e.g. doesn’t lose component local state on reload)
Okay giving it a go, thanks @anmonteiro
@bbss: wrt to your actual problem, you don’t need dom-node
to use defcard-om-next
simply drop your Root component there
example:
(defcard-om-next my-card
MyComponent)
If I copy the examples from the devcards repo they don't work, neither do the ones from the om next repo
if they don’t render then you might just have a runtime error
are those devcards online somewhere?
I can take a quick look
@bbss: those I know, and they work for me
I meant your project
Hmm but if I copy those they don't work for me. I don't have the project online but it's just a couple of lines.
@bbss: maybe something wrong with your namespace requires?
Just guessing here if I can’t have a look
(ns synth.devcards.adsr
(:require
[synth.devcards.time]
[synth.devcards.player]
[synth.devcards.editor]
[synth.devcards.radial-menu]
[clojure.data :as data :refer [diff]]
[om.next :as om :refer-macros [defui]]
[om.dom :as dom]
)
(:require-macros
[devcards.core :as dc :refer [defcard defcard-om-next dom-node]]
[cljs.core.async.macros :refer [go]])
)
@bbss: does your CLJS build have :devcards true
?
@bbss: FWIW the namespace declaration looks good
Anyway I'll dive a little deeper and give your library a go as well. Thanks for your effort.
if you’re using figwheel, try (reset-autobuild)
at the CLJS REPL
nope, didn't help. I had tried lein clean before. Maybe it's an old dependency in my maven cache or so.
@bbss: one last thought: which Om version are you using?
hrm that should work, yeah
@bhauman:
in dependencies: [figwheel-sidecar "0.5.4-7"]
in profiles:
:profiles {:dev
{:dependencies [[binaryage/dirac "0.6.1"]
[ring/ring-devel "1.5.0"]
[com.cemerick/piggieback "0.2.1"]
[figwheel-sidecar "0.5.4-7"]
I'm going to be delving back into devcards work in a few weeks hopefully, so many cool opportunities to support spec
hmmm not sure what you are talking about, your talking about code context, or the propagation of clojure 1.9 macro errors?
The arrow pointing to the place where things are going wrong and also showing when for instance an arguments list is too short.