This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-08
Channels
- # aws-lambda (2)
- # beginners (66)
- # calva (7)
- # cider (1)
- # clj-kondo (1)
- # cljs-dev (4)
- # cljsrn (2)
- # clojure (79)
- # clojure-android (1)
- # clojure-spec (8)
- # clojure-sweden (3)
- # clojure-uk (12)
- # clojurescript (6)
- # datomic (18)
- # duct (1)
- # emacs (31)
- # fulcro (8)
- # hoplon (5)
- # joker (4)
- # luminus (9)
- # off-topic (7)
- # reagent (6)
- # rewrite-clj (8)
- # shadow-cljs (9)
- # spacemacs (42)
- # tools-deps (9)
- # yada (4)
An application design question: when navigating to a page, i have a pre-route transaction that performs a pruned load (excluding a large table). After arriving on the page, I want to incrementally load that large table automatically. Is it reasonable to launch that load in a :componentDidMount callback function? Or is there perhaps a better "hook" for this kind of situation? Thanks.
@thomasmoerman by incrementally do you mean load more data for the first few rows, then the next few, etc?
or is it two steps: (1) load pruned query data (e.g. which contains length of table), then (2) load all data?
@thomasmoerman the recommendation in general is to prefer calls to load in the event that triggers the routing change in case react has to re-mount your component, that said using componentDidMount
is not the worst thing you could do i sometimes use, especially when i’m prototyping
however, i strongly prefer using the dynamic router, which has a hook for doing exactly this type of thing
for not now it’s in the incubator