untangled

NEW CHANNEL: #fulcro
currentoor 2016-12-23T00:02:58.001023Z

hahaha! 😂

fragamus 2016-12-23T06:43:46.001034Z

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

ianchow 2016-12-23T07:31:36.001036Z

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

ianchow 2016-12-23T07:45:15.001037Z

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?

mitchelkuijpers 2016-12-23T08:26:44.001039Z

@ianchow you should refrain from using component lifecycles for this

mitchelkuijpers 2016-12-23T08:27:13.001040Z

You should try to fire loads from actions

mitchelkuijpers 2016-12-23T08:28:20.001045Z

But I did the exact same thing when I started with untanged

mitchelkuijpers 2016-12-23T08:28:46.001046Z

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

ianchow 2016-12-23T08:36:22.001047Z

@mitchelkuijpers thanks. yeah solved it by simple putting the df/loads somewhere else.

👍 2
fragamus 2016-12-23T11:49:49.001052Z

@lanchow Yes I am running 2 repls, backend and frontend as I have done for several other recipes.

ianchow 2016-12-23T16:16:42.001063Z

@fragamus just cloned and ran it, works fine.

fragamus 2016-12-23T16:17:36.001064Z

@ianchow are you using intellij?

ianchow 2016-12-23T16:18:22.001065Z

@fragamus nope, spacemacs.

ianchow 2016-12-23T16:23:41.001066Z

have you tried (reset-autobuild) on figwheel?

fragamus 2016-12-23T16:39:17.001067Z

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

fragamus 2016-12-23T16:40:26.001068Z

To be clear, I used (reset-autobuild) on figwheel, and that looked ok, but the app failed as shown above.

tony.kay 2016-12-23T17:04:24.001070Z

@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

tony.kay 2016-12-23T17:05:18.001072Z

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.

tony.kay 2016-12-23T17:05:24.001073Z

Never put the logic in the UI

tony.kay 2016-12-23T17:06:02.001074Z

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)

👍 1
tony.kay 2016-12-23T17:07:38.001075Z

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

tony.kay 2016-12-23T17:08:04.001076Z

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

tony.kay 2016-12-23T17:08:19.001077Z

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

tony.kay 2016-12-23T17:08:29.001078Z

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