Open Conaws opened 7 years ago
This can be nicely wrapped in a util function
(defn wboundary [elem]
(reagent/as-element [(fn [] [recalcitrant.core/error-boundary
elem])]))
(defn ops []
(assert false)
[:div "hey"])
(defcard oopss
(with-boundary [oops]))
Looks good! Maybe it would be possible to contribute this back to devcards? Either by default or as a defcard-safe
variant. What do you think?
I didn't see an issue in devcard's github. If we want to move this forward, I think a good first step would be to report the problem there.
You gave a great example during a breakout at Clojure remote of how to use this in devcards, posting example here for others
(defn ops [] (assert false) [:div "hey"])
(defcard oops (r/as-element [(fn [] [error-boundary [ops]])]) )