This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-20
Channels
- # aatree (42)
- # admin-announcements (25)
- # alda (28)
- # aws (56)
- # beginners (67)
- # boot (248)
- # braid-chat (9)
- # cider (52)
- # cljsrn (11)
- # clojars (4)
- # clojure (341)
- # clojure-czech (5)
- # clojure-japan (3)
- # clojure-nl (2)
- # clojure-russia (57)
- # clojured (10)
- # clojurescript (35)
- # community-development (18)
- # cursive (17)
- # datascript (5)
- # datomic (39)
- # dirac (25)
- # editors (2)
- # events (3)
- # hoplon (60)
- # jobs (5)
- # ldnclj (9)
- # leiningen (5)
- # mount (20)
- # off-topic (3)
- # om (263)
- # onyx (69)
- # perun (5)
- # proton (55)
- # re-frame (7)
- # reagent (24)
- # spacemacs (6)
- # yada (16)
has anyone here integrated a piece of plain vanilla JS code into a CLJS+reagent app? any words of wisdom?
should i be wrapping it in a react component and then somehow make my main reagent/re-frame app use it, or something like that?
Is this component already a React component?
@peterbak: ^^ I'm going to assume not. In which case, use this technique: https://github.com/Day8/re-frame/wiki/Using-Stateful-JS-Components
ah, yes, just the guidance I need! thanks so much @mikethompson
@gadfly361: btw, the soda-ash demo is very nice demonstration of devcards. Really appretiated! Thanks
@pepe Thanks! Should be pushing out a new release in the next day or two. Will include a new devcard page going over some of the core concepts that I've neglected to document so far.
@gadfly361: I am actually eager to use it on some future project, just for the taste of the Semantic UI. Ping me after the release, please. I would love to review what’s new
@pepe it should round out the Elements portion of Semantic. One breaking change.. removing :group?
option and replacing with plural versions of the elements. As an aside, i would advise only using soda-ash in toy projects for a while until the api stabilizes. Hoping to get feedback from you and others who are testing it out :)
@mikethompson: re-frame's wiki is one of the best gems about reagent out there. Thanks
Thanks @hugobessaa. Always very nice to get positive feedback.
open source maintainers diserve that! specially when doing great work
hope to help you out in a few weeks
shameless self promotion: I've got an example here which shows how to use react-timer-mixin with reagent. The problem being solved is: sometimes in a search bar you want a delay before the UI is refreshed. I found examples of this in cljs world using core.async but I wanted to build something a lot simpler. hence this example: https://github.com/ducky427/reagent-timer-demo
In this example, the text is filtered 600ms after there is a change in the search input text box
@rohit: does the mixin do anything? It looks like you're implemeting the delay yourself completely
@mbertheau: actually it gives you safe access to setTimeOut
. from the docs of the mixin:
>Using bare setTimeout, setInterval, setImmediate and requestAnimationFrame calls is very dangerous because if you forget to cancel the request before the component is unmounted, you risk the callback throwing an exception.
>If you include TimerMixin, then you can replace your calls to setTimeout(fn, 500) with this.setTimeout(fn, 500) (just prepend this.) and everything will be properly cleaned up for you.