hoplon

The :hoplon: ClojureScript Web Framework - http://hoplon.io/
flyboarder 2018-07-31T00:39:31.000102Z

@vigilancetech it looks like your cells are being initialized with nil, if you want them to have an initial value then you need to do that when you construct them, it’s like you said

flyboarder 2018-07-31T00:40:09.000117Z

"or boot-reload is re-initializing something that wouldn't be found in a virgin page load"

vigilancetech 2018-07-31T01:57:29.000043Z

@flyboarder yeah, I'm not seeing that though because I can run what the cell formula does by hand and the underlying data is there. Its just the cell formula won't run until after a boot-reload. It seems more like its a lazy evaluation thing or something in javelin that gets initialized by boot-reload that isn't initialized in an initial page load.

2018-07-31T03:07:34.000118Z

@flyboarder @vigilancetech I had a similar issue where my formula cells wouldn't load on the initial pageload, when I start with a hoplon.firebase cell. I had to use a short with-timout on pageload to initialize the cells with Firebase content, on first pageload (from Dev server at least). I tried the other page-load macros, and I think even defonce and they did not seem to work for me in this regard.

flyboarder 2018-07-31T03:11:02.000087Z

@chromalchemy I had that issue also

flyboarder 2018-07-31T03:11:54.000105Z

One thing I often find with hoplon apps, is there isn’t a great way to initialize cells after events like authentication, i have to stick when’s every where

2018-07-31T03:12:46.000140Z

@vigilancetech Specter has some different options baked in for precompilation and caching. I don't really understand them, but there's a page in the wiki on it. Hopefully that is not getting in the way. I just use the standard functions, and sometimes (path) to define a path segment, and things seem to work fine with Javelin for me.

flyboarder 2018-07-31T03:13:41.000070Z

@chromalchemy how do you get around initializing cells after firebase auth?

2018-07-31T03:16:45.000043Z

@flyboarder I have not used with-auth yet, as I'm working on a personal app. But I would like to integrate it soon. Any recommendations?

flyboarder 2018-07-31T03:27:34.000034Z

The thing to look out for is when you try to watch a DB path that is protected, you will need to initialize those after authentication is successful

flyboarder 2018-07-31T03:27:48.000143Z

Otherwise they stay unauthenticated

flyboarder 2018-07-31T03:28:27.000034Z

I have used dynamic bindings to get around this in the past

vigilancetech 2018-07-31T03:56:51.000025Z

@flyboarder when you say "dynamic bindings" are you saying like you'd pass a string to eval?

vigilancetech 2018-07-31T04:00:02.000094Z

@chromalchemy so it sounds like this is not merely a specter problem

vigilancetech 2018-07-31T04:21:09.000108Z

@flyboarder or using "binding" and ^:dynamic?

flyboarder 2018-07-31T04:22:28.000136Z

Yes binding and :^dynamic

flyboarder 2018-07-31T04:22:45.000058Z

@vigilancetech ^

👍 1