This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-30
Channels
- # admin-announcements (24)
- # beginners (27)
- # boot (32)
- # cider (9)
- # cljs-dev (2)
- # clojure (96)
- # clojure-berlin (33)
- # clojure-dev (2)
- # clojure-gamedev (2)
- # clojure-germany (1)
- # clojure-italy (8)
- # clojure-japan (2)
- # clojure-russia (21)
- # clojurescript (178)
- # clojutre (3)
- # code-reviews (4)
- # core-async (58)
- # core-logic (22)
- # core-matrix (4)
- # cursive (10)
- # datomic (131)
- # events (9)
- # ldnclj (31)
- # off-topic (57)
- # onyx (9)
- # reagent (23)
@lazy-lambda if you use chrome, check out react tools, it gives you a handy warning when you set the value of an input element but no onChange handler
@tomisme: Okay, Checking it out.
is adding stylesheets in app-db considered a good idea ?
Where should I put visual states then ?
I was thinking reactive-css
Let’s say one of the buttons is green in normal mode but changes it’s color to blue on-hover. If I put the color of the button on app-state and subscribe it, and then on-hover change the app-db color to blue, the button’s color would also change.
hence reactive-css.
And the visual state of components.
@lazy-lambda: you'd normally have some state stored in app-db
, like :warnings
true
and then in your views, you would condition the colour of the button based on that state.
The view (or component) is a rendering of the state.
In effect, it is not so much that you'd put the colour of the button in app-db
... rather you'd have the state which CAUSED the button to be rendered in a certain colour in app-db
Got-it
Based on the value in app-db
(to which you have a subscription) you can add classes to a [:div ]
(or not) and add inline styles (or not) etc. These things would control the button colour.
I prefer inline styles.