Fork me on GitHub

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

Ian Chow07:12:36

@fragamus are you running 2 repls - for client and server? the cookbook recipes are full stack.

Ian Chow07:12:15

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

Ian Chow08:12:22

@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.

Ian Chow16:12:42

@fragamus just cloned and ran it, works fine.


@ianchow are you using intellij?

Ian Chow16:12:22

@fragamus nope, spacemacs.

Ian Chow16:12:41

have you tried (reset-autobuild) on figwheel?


I just tried but it gave the same error shown above.


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.


Never put the logic in the UI


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)


@fragamus Did you mess with versions of things? lein deps :tree might warn you of conflicts. Anything in your lein user profile that might be pulling in alt versions of things?


e.g. did you put lein-figwheel in your user profile or something


it's complaining about things being missing that are part of compiler.


so, not a code problem with the recipe. It's your env