This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-23
Channels
- # ai (1)
- # beginners (84)
- # boot (111)
- # cider (2)
- # cljsrn (9)
- # clojure (245)
- # clojure-italy (2)
- # clojure-mke (1)
- # clojure-russia (6)
- # clojure-spec (92)
- # clojure-uk (32)
- # clojurescript (55)
- # core-async (1)
- # cursive (8)
- # datomic (19)
- # events (1)
- # hoplon (379)
- # lambdaisland (4)
- # lein-figwheel (8)
- # off-topic (115)
- # om (18)
- # om-next (5)
- # onyx (25)
- # re-frame (8)
- # reagent (5)
- # ring-swagger (1)
- # rum (19)
- # schema (3)
- # untangled (24)
hahaha! 😂
I noticed in project.clj that the module name seems wrong... untangled/demo:1.0.0 instead of untangled/paginate-large-lists:1.0.0
@fragamus are you running 2 repls - for client and server? the cookbook recipes are full stack.
looks like doing a df/load with post-mutation from within componentDidMount results in an infinite loop. i would like to load some data when a page becomes visible / mounted, then use post-mutation to process that data. what would be the right way to do this?
@ianchow you should refrain from using component lifecycles for this
You should try to fire loads from actions
But I did the exact same thing when I started with untanged
But if you want to load data for a page then you probably have a router or something right? That would be good place to fire loads from
@mitchelkuijpers thanks. yeah solved it by simple putting the df/loads somewhere else.
@lanchow Yes I am running 2 repls, backend and frontend as I have done for several other recipes.
To be clear, I used (reset-autobuild) on figwheel, and that looked ok, but the app failed as shown above.
@ianchow I don't recommend tying IO to component lifecycle. The proper way is:
- Do a mutation (which you know to cause something to happen in the UI). From within that mutation, you can compose in a load-action
The thing to note is that nothing changes on the UI without some event. Initial loads go in started-callback
. Other loads go via user events, which trigger mutations.
or else you lose the pure nature of your UI and end up with nightmares like IO happening because React decided to unmount/mount your component for some reason (related to vdom diff)