This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-11
Channels
- # aleph (1)
- # architecture (18)
- # beginners (57)
- # boot (13)
- # cider (47)
- # cljs-dev (28)
- # cljsjs (13)
- # cljsrn (39)
- # clojure (258)
- # clojure-greece (16)
- # clojure-italy (2)
- # clojure-miami (1)
- # clojure-nl (9)
- # clojure-poland (15)
- # clojure-russia (369)
- # clojure-spec (53)
- # clojure-uk (49)
- # clojureremote (3)
- # clojurescript (135)
- # core-matrix (1)
- # cursive (11)
- # datascript (3)
- # datomic (4)
- # emacs (12)
- # figwheel (13)
- # hoplon (7)
- # interop (7)
- # jobs-discuss (33)
- # lumo (28)
- # off-topic (15)
- # om (7)
- # onyx (26)
- # pedestal (10)
- # perun (1)
- # planck (10)
- # re-frame (54)
- # reagent (16)
- # ring (5)
- # ring-swagger (50)
- # rum (2)
- # spacemacs (2)
- # unrepl (125)
- # untangled (12)
we just have a template that we copy and do a find/replace on
pretty crude, but we haven't seen the value in making it more automated (yet)
Seems fine, we have some standard ones that do it already I think. Just be mindful of ordering and interactions with other cofx
@eveko there days I asked a "complementary" question: why not pass db as parameter for all functions.
Why would you want to have multiple dbs rather than say different keys in a map?
well , I am at the point that I need more panels... It feels kind of chaotic having keys all over the place, along with different types of collections. Though it could be me clinging of to some old OO perspective ... Also to end with another question I am using bootstrap for css. Is replacing href(in navbar) with on-click re-frame dispatch correct? I apologize if I am asking too many novice questions
I don't need any URL routing, all my data is taken from a java rest api. so I need to dispatch events that make ajax calls, the api has all crud handling. I am indeed using the front-end only template. Though it is going to be fun when I get to present this in class, almost everyone else in my classroom will use angular or jsf for their front end solution.
gotcha, I assumed from "I need more panels" + replacing the href you were dealing with routing concerns. I think multiple dbs is against the re-frame mindset, one thing that helps me organize stuff in a large app-db is namespaced keywords
and denormalizing data, so instead of a :logged-in-user {:email ...}
I would have a ::app/users []
and then ::app.users/logged-in-id 10
I have only seen :: in spec. I have yet to look into that, and it seems like something that i need to study. I already have in my app db though :users [{user1}{user2}] Also, is it a good idea to put the access token inside the app db? or would that be a really bad idea security wise?
Am I missing something but if I want to get the sult of a function as the text of html element do I need to enclose it in parens? [:div format-text "some text"] or [:div (format-text "some text")] The first does not change anything in the div, the second makes the page blank
and one which would subscribe to that sub and provide the result of calling format-text
on it
the first sub :name
provides "Bruce"
, the second sub :greeting
prepends that string -> "Hello Bruce"
non-idiomatic should still work but makes it harder to decomplect (rich hickey (r)) and also I think can lead to things re-rendering when they dont need to
clojure
[:ul ;<-- dont forget to surround
(for [{id: id b :bio} @users]
^{:key id} [:li b])] ;<--- dont forget key meta data
in my example the sub is giving me all the users but I'm only using the :biography
key in them
however, if the :name
of any of the users changes I think this whole ul
would re-render as @users
itself is a different value
but if I were to make a subscription that itself subscribes to users
and just returns (map :bio ...)
on them then it would not need to re-render
that's pseudo-clojure but that's the idea, return fully realized data from a subscription so you dont have to do any further manipulation / transformations to it
at least that's my understanding from the docs + using this for a while, thompson or compton might read all this later and kick me out of the channel 🙂
Does :dispatch-n
guarantee event order? e.g.
{:dispatch-n (list [:do :all] [:three :of] [:these])}
Would the events always happen in this order [:do :all] [:three :of] [:these]
?@qqq we use re-com with Electron @kenny yes, you get that ordering guarantee
Awesome, thanks @mikethompson.
@mikethompson : do you guys use lumo or planck by any chaance too? or is it cljs + figwhell ?
cljs + figwheel
@mikethompson : so no brepl / cljs-repl ?