This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-28
Channels
- # bangalore-clj (1)
- # beginners (67)
- # braveandtrue (179)
- # cider (28)
- # cljdoc (1)
- # clojure (132)
- # clojure-conj (3)
- # clojure-dev (1)
- # clojure-finland (6)
- # clojure-nl (2)
- # clojure-russia (6)
- # clojure-spec (19)
- # clojure-uk (62)
- # clojurescript (90)
- # clojutre (5)
- # component (2)
- # cursive (30)
- # data-science (1)
- # datomic (42)
- # duct (9)
- # emacs (1)
- # figwheel-main (158)
- # fulcro (57)
- # funcool (3)
- # hoplon (1)
- # jobs (17)
- # mount (38)
- # off-topic (15)
- # re-frame (53)
- # remote-jobs (2)
- # schema (11)
- # shadow-cljs (299)
- # spacemacs (25)
- # specter (2)
- # tools-deps (54)
- # vim (11)
- # yada (6)
@thheller a few ways. ptransact
is really the main one because it is traceable…but you probably mean “after any arbitrary remote”?
I would go for the erstwhile 'friends' example: https://github.com/fulcrologic/fulcro-getting-started#17-the-secret-sauce--normalizing-the-database. You may need to read it many times and ponder etc. It is all about understanding the role of idents.
the video series is really nice for getting started https://www.youtube.com/watch?list=PLVi9lDx-4C_Rwb8LUwW4AdjAu-39PHgEE&v=nlT45ikSEOE ?
I just pushed the first pre-alpha version of the new UI stuff I'm working on. its still in pretty rough shape and far from ready for actual use. you can however do the basic builds commands like starting/stopping watch, compile
if anyone wants to tell me about all the fulcro stuff I'm doing incorrectly I'm all ears 😉 https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/cljs/ui/app.cljs
its currently pretty easy to overload the UI because the underlying websocket is way too chatty
but next up I want to properly visualize the build progress and show build warnings/errors in the UI
its pretty impressive how little actual client-side code there is for what it does already
anyone have any recommendations regarding namespaced keywords? its a total mess right now. I created a few dummy empty alias namespaces but I really don't like that approach. just using one singular namespace for all aliases currently seems best to me
It depends we create namespaces for domain objects
like shadow-cljs.domain.build
and then we add the specs there for that domain part and require and alias those keywrods
yeah I started with shadow.cljs.model
but it somehow felt wrong putting everything into one ns
But we do create some different namespaces per thing, but I still don't like it
But it kinda works for us
I kinda settled on using specific keywords a while ago so I guess I'll stick with just one ns
:project/id
and :user/id
destructure to the same id
which sucks. so just :my.alias/project-id
and :my.alias/user-id
seems best right now
True but you can destructure that differently, but that is just personal preference
does fulcro.client.data-fetch
cause a full re-render? I’m having an issue where some of my components are going back to a default state after the fetching
was I wrong under the impression that a component only re-renders when its own query data changes not whatever child queries I joined in?
trying to deploy a fulcro app to heroku but missing an npm install when pushing. I used lein new fulcro app-name nodemo shadow-cljs
https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/cljs/ui/app.cljs#L80
when I add this "global" reference the ident function of that component gets called with a {::active-build :browser}
map for some reason I can't explain
I (assoc state ::active-build :browser)
in a tx and that somehow causes the strange flow of events
@thheller having a dynamic ident seems a very bad idea IMO
what you mean? when you do that it starts to working? I mean this part https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/cljs/ui/app.cljs#L73-L75
one tip, since you are using connect, having those -by-id
can be a bummer, if you just use the same prop name for ident key (`::m/build-id` in this case) everything will just fit in place regarding client/server comms
lets say you wnat to lazy load data for the build after it's rendered
if your ident key is [::m/build-by-id ...]
, then it doesn't match the ident for the server side, which would be [::m/build-id ...]
, so you have to convert one to the other at some point ,and convert again on the way back
if your ident is just [::m/build-id ...]
you don't have to convert anything at all
there is, when you make a query like: {[::m/build-id 123] [::m/some-build-data]}
in pathom connect terms this means: "I'm proving you a ::m/build-id
with value 123
(or {::m/build-id 123}
)", then the query will use that information as a starting point to find related data (using connect indexes)
try on OgE, it will auto-complete available idents for you 😉
but that was a tip, not a solution to the problem, hehe, we can keep on that
so, at what point you are seeing the strange behavior, when you start the app?
because ident is only called by fulcro in a few situations, the first one being data merge