This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-30
Channels
- # aws (4)
- # beginners (143)
- # boot (37)
- # cider (31)
- # cljs-dev (53)
- # clojure (303)
- # clojure-conj (5)
- # clojure-dev (106)
- # clojure-dusseldorf (2)
- # clojure-greece (3)
- # clojure-italy (23)
- # clojure-spec (83)
- # clojure-uk (7)
- # clojurescript (328)
- # core-async (25)
- # cursive (2)
- # datascript (2)
- # datomic (3)
- # emacs (10)
- # hoplon (1)
- # jobs (2)
- # lein-figwheel (1)
- # leiningen (13)
- # luminus (6)
- # off-topic (38)
- # onyx (2)
- # parinfer (13)
- # pedestal (2)
- # portkey (5)
- # re-frame (11)
- # reagent (2)
- # shadow-cljs (61)
- # specter (6)
- # unrepl (60)
- # vim (4)
Probably there are JS APIs for that?
Not quite sure what you meant there
after some more research the HTML textarea object exposes the needed data and @sekao has a library called cross-parinfer
and some dom functions in paren-soup
that meet my needs
Anyone have opinions on view components that generate their own subs and events. We are starting to build more complicated components, like paginated table, and have a lot of similar views and events for each one. We were able to write code that bundles this all into a single view component so you don’t have to manually create all the subs and events. The problem is that all the reg-sub and reg-events fire every time the component is redrawn. That doesn’t seem like a big deal but wanted to get others feedback.
I understand this leads to the convention vs configuration debate, but would like to stay out of those waters. Really my question is: have people done any auto generation of subs and events and are there ways to prevent the re-registering
Hi. I did no such thing.
What I am using though is events and subs which are registered just once - but they accept some sort of id
as their argument. Data of the component is then stored under the id
in app-db
.
So If I understand you correctly, you're generating subs like :user-grid-page-data
, :company-grid-page-data
...
I have only 1 sub :grid-page-data
which accepts id
parameter (`user`, company
...).
Same for events.
Example can be seen here: https://github.com/nenadalm/learning-reactjs/blob/master/re-frame/src/app/views.cljs#L7 where I have 2 different counters (one is shown twice). Both counters use single event: https://github.com/nenadalm/learning-reactjs/blob/master/re-frame/src/app/components/counter/events.cljs#L5.
hi there! I have a project were I would like to send tracking events to an analytics provider. I am currently using add-post-event-callback
but it doesn't fit the bill 100% since the callback requires a handle on app-db
. do you guys know of a way to do this without using globals or how are people solving this today?
@mikerod we're storing an online
flag in there that indicates whether or not the app is connected to the internet. if there is no connection, the tracking events need to be stored to be submitted at a later time.