Fork me on GitHub
#cider
<
2017-07-17
>
qqq02:07:44

is there a way to have the cider repl to output / render dom/svg elements ?

qqq02:07:10

so I want to have a sexp that returns a reagent component, then I want cider to, instead of displaying the data, render the element in a browser and display it

benedek06:07:04

you essentially want figwheel, @qqq?

qqq06:07:31

I don't want auto recompilation of cljs

qqq06:07:40

I want a clj repl that can also display hiccup

qqq06:07:48

they're two separate issues

richiardiandrea12:07:15

@qqq that is an interesting idea, display hiccup in a browser? If so you could work in Dirac (Google dev tools for Cljs)

dpsutton12:07:13

well, if it's returning a reagent component it would seem like it needs quite a bit of infrastructure to display, ie, all of the subscriptions, etc. so it would need to be in a clojurescript repl. then there would be the dependencies required like CSS. but newer versions of emacs have a webkit browser accessible to them so perhaps this would be possible. but quite a bit of code required to do so

ustunozgur16:07:22

@qqq proto-repl (atom plugin) could probably do something similar: https://atom.io/packages/proto-repl

qqq21:07:46

@dpsutton : you're right, reagent can contain functiknos/ code, hiccup is juust pure data right? let's say it returns hiccup, which I want to serialize to client and display

dpsutton21:07:22

hiccup (i think) has a html function. and that should return some html and then you could use emacs to render that either by saving to a temp file and browsing the url of that file or working with the webkit stuff