This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-14
Channels
- # aws (1)
- # bangalore-clj (1)
- # beginners (48)
- # boot (65)
- # braveandtrue (1)
- # cider (1)
- # clara (15)
- # cljs-dev (7)
- # clojure (179)
- # clojure-austin (1)
- # clojure-denmark (2)
- # clojure-greece (68)
- # clojure-italy (7)
- # clojure-russia (41)
- # clojure-serbia (9)
- # clojure-spec (44)
- # clojure-uk (27)
- # clojured (15)
- # clojureremote (20)
- # clojurescript (70)
- # community-development (2)
- # core-async (10)
- # cursive (14)
- # datomic (36)
- # defnpodcast (3)
- # emacs (13)
- # events (13)
- # hoplon (33)
- # immutant (18)
- # instaparse (2)
- # jobs (29)
- # jobs-discuss (71)
- # klipse (38)
- # lein-figwheel (4)
- # leiningen (1)
- # mount (34)
- # off-topic (36)
- # om (3)
- # onyx (51)
- # pedestal (5)
- # perun (8)
- # proton (2)
- # rdf (8)
- # re-frame (33)
- # reagent (24)
- # remote-jobs (1)
- # rum (6)
- # spacemacs (2)
- # specter (14)
- # sql (5)
- # testing (6)
- # untangled (1)
- # vim (10)
- # yada (3)
gut-feeling/top of my head/no evidence based suggestions: vue.js or cycle.js maybe?
yeah i’m basically between writing some procedural clojurescript or running to a js lib vue’s approach seems to be similar to react’s (in which you write a bunch of css classes and it coordinates adding/removing them at the appropriate lifecycle moment of the component), while cycle.js has a tween thing that’s similar to reanimated (probably doesn’t benefit from hardware acceleration but gives more flexibility)
@rafaelzlisboa I’ve been working on a reagent project, I have to admit its not very animation-heavy .. but react’s css transition group has been treating me alright
I had to actually take a somewhat serious look at it and see if it solves my problem, I wasn’t disappointed
in Om code i've just used transacts and/or setState calls to make things animate because it has a render loop built in. as long as you're only changing properties that are rendered by the gpu (https://www.html5rocks.com/en/tutorials/speed/high-performance-animations/) then you should be fine
here is some code using the excellent bardo lib with the older version of om: https://github.com/pleasetrythisathome/bardo/blob/master/examples/om.cljs
I like the ReactCss approach but it does involve more work on each om component. I am not a frontend expert but I guess you could still use CSS3 Animation/Transition for most of the use-cases
@danvingo thanks for the mention! makes me really happy to hear people are using bardo
https://www.slant.co/topics/558/~best-functional-languages-to-learn-for-web-frontend-development
Hi, is it possible to develop reagent apps without jvm on machine? I'd like to use in teaching environment and I can't install java on these computers. Is lumo sufficient or I need something more to compile apps to js?
How about Klipse?
Works nicely with reagent
You mean something like this: http://blog.klipse.tech/reagent/2016/12/31/reagent-in-klipse.html ?
@dhucerbin my own blog, but this supports reagent editing and collaboration in the browser: http://thegeez.net/2017/02/06/crepl_import_4clojure_reagent.html
but somehow after requiering it [cljsjs.react-select]
and trying to used it (js/react-select.Select ....)
I get Uncaught ReferenceError: react_select is not defined
that's not the name of component
here's an example of how to use react-select
@rootcat, (js/...)
allows you to reference javascript globals
cljsjs just injects javascript globals
you can't access the libraries shipped through the ns require unfortunately
`<Select multi simpleValue value={this.state.value} placeholder='Some text' options={this.state.options} onChange={(e) => this.handleSelectChange(e)} />`
but the map requires key/value pair and in this react component multi
does not contain value
:multi true
pretty sure that's what JSX generates as well
the options prop in javascript requires an array of of objects [{value: 'X', label: 'Y'}, ..., ]
check my snippet
it has to be js objs, but I think the outer collection can be a vector, but to be safe you can use into-array
right
I copied them over and just included them manually
the file is in the jar I believe
actually I use this:
[:link {:href "",
:rel "stylesheet"}]
(that's hiccup on the server)
react-select is awesome by the way, highly recommeneded
hey guys I'm looking for a react widgets for node-diagramming - similar to quartz composer, or let's say facebook's origami tool.
The problem is when I search for 'node' or whatever I get nothing but node-js related stuff.
curses node-js for name
when I compile for release with optimizations, I get a "SEVERE: constant location set more than once" when I have code that calls (set! js/location ...). What's a more idiomatic or correct way to do that?
@shader try (set! (. js/window -location) ...)
I'm having some trouble wrapping my head around an api that returns promises. Is there any way to deref a promise and get a value?
you could use core.async and put the result on a channel, then use it in a go
block in another part of the code
Right, so side effect it somewhere I can get to it. I can reset!
it into an atom as well, I just figured there'd be some equivalent to deref
. Thanks!
https://gist.github.com/swannodette/5882703 here is a short example. Here is js/setTimeout
, but you could do it from the promise callback and return a value just as easily