This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-10
Channels
- # aleph (2)
- # arachne (1)
- # beginners (5)
- # boot (33)
- # cider (12)
- # cljs-dev (6)
- # cljsrn (26)
- # clojure (33)
- # clojure-austin (7)
- # clojure-belgium (6)
- # clojure-chicago (1)
- # clojure-dusseldorf (1)
- # clojure-fr (1)
- # clojure-hamburg (1)
- # clojure-nl (11)
- # clojure-portugal (3)
- # clojure-russia (14)
- # clojure-spec (35)
- # clojure-uk (28)
- # clojurescript (49)
- # component (7)
- # core-async (75)
- # cursive (13)
- # datomic (15)
- # dirac (57)
- # emacs (5)
- # events (1)
- # hoplon (34)
- # jobs (2)
- # jobs-discuss (8)
- # lambdaisland (1)
- # lein-figwheel (7)
- # leiningen (3)
- # om (5)
- # onyx (8)
- # re-frame (56)
- # reagent (13)
- # testing (7)
- # untangled (30)
- # vim (51)
- # yada (17)
hey folks, how should I implement a sidebar component in theory ? the sidebar trigger is my concern ?
like, with hamburger menu button?
@lxsameer block with "position: absolute" and "left: -(blockWidth)"?
@savelichalex i see, i meant the re-frame solution.
In fact I'm a bit confused about implementing a functionality which we already implemented using a jquery plugin
@lxsameer and what the big deal? just trigger event that change sidebar styles, in css you can apply transitions
subscribe to field in app-db, smth like :sibebar-open bool
and change it
but how should i use the modules and libraries from js and jquery in clojurescript ? Just requiring them ?
depends on what you actually need
there are a lot of DOM-related stuff in google closure library
yup, they are efficient and battle tested
though if you are doing re-frame app, you might not need them, if your menu+activation button are just reagent components, you already have all you need
it is just that you barely need to manually touch the dom
in reagent/re-frame
pretty much like in react
I didn't used WOW
basically some popular libs adapted for cljs
Visual Programming Environment very well suited to the re-frame https://youtu.be/WjJdaDXN5Vs?t=22m31s
The #lambdaisland episode on re-frame is out https://lambdaisland.com/episodes/re-frame
or just sign up for a month to see what it's like 😉 you can cancel at any time, your subscription will stay active until the end of the month. If it's really too expensive for you then ping me we can work something out!
manipulating dom directly (using jquery or something) is a bad thing in re-frame right ?
@lxsameer typically such things are done "outside" of your react-ish application, in the same place you might f.e. instantiate components
but, being pragmatic, when working in React in the past I've leveraged the component lifecycle to do state-driven imperative dom operations
but if I didn want to do that, I think my approach would involve reg-event-fx
mutations
the idea being, your component somewhere triggers an event that triggers an imperative operation on the body element
you can use it for triggering just about anything that doesn't involve mutating the app state directly
w.r.t. reg-fx
/ reg-cofx
, i'm coming back to re-frame after a hiatus, and it looks like a bunch of cool stuff has been added. What's the best resource for catching up on the changes?
@mattly so you know how can i tell if a library is google closure compatible or not, by any chance ?
@mattly: thanks! I'll read through em!
Are these (co)effects related to the category theory notion, ex: http://tomasp.net/coeffects/
nm, as I'm reading thru, they are, and i'm excited to be working with re-frame again! haskell was my re-frame-hiatus, and to see C.T. coming into clojure is sweet!
@lxsameer regarding using jquery, this may help: https://github.com/Day8/re-frame/blob/master/docs/Using-Stateful-JS-Components.md
@josh.freckleton see also /Changes.md
@mikethompson ah, good call thanks, that'll give me a high level view