untangled

NEW CHANNEL: #fulcro
macrobartfast 2017-04-28T16:16:26.771786Z

after going back to the basics for about a month, taking another crack at untangled!

macrobartfast 2017-04-28T16:16:48.779496Z

expect some wonky questions. šŸ˜Š

tony.kay 2017-04-28T16:17:07.786202Z

A lot of people find the youtube videos really helpful

macrobartfast 2017-04-28T16:23:40.920509Z

I'm on on them as we speak!

macrobartfast 2017-04-28T16:23:56.925847Z

into the overall project structure one now.

tony.kay 2017-04-28T16:24:33.938091Z

good deal. The latest whiteboard one is really helpful with server interaction stuff. Not a bad idea to watch that one once you've got the basics down

macrobartfast 2017-04-28T16:25:05.949537Z

ah ok will do

macrobartfast 2017-04-28T16:25:22.955394Z

and that's what I'm excited about (eventually)... getting the whole stack in place.

macrobartfast 2017-04-28T17:25:17.164964Z

your repl reload from cider is much faster than the default šŸ˜‰

tony.kay 2017-04-28T17:27:00.199542Z

if that comment is directed at me, not sure what you mean. I'm not using CIDER

macrobartfast 2017-04-28T17:34:29.353125Z

well, directed at untangled... as you're not a cider user, doesn't help you, but just a happy fyi, I guess.

macrobartfast 2017-04-28T17:35:08.366149Z

I think it's totally great your videos (as a result of your personal preferences) use intellij, btw...

macrobartfast 2017-04-28T17:35:27.372760Z

because I think the emacs thing is a big blocker for a bunch of potential clojurians.

tony.kay 2017-04-28T17:36:11.387447Z

oh I see. In regular development I rarely need to restart a REPL, so I don't really care about those few seconds. I prefer IntelliJ for the same reason I prefer OSX (over Linux) at this point: lack of a need to fiddle with the settings all the time.

macrobartfast 2017-04-28T17:36:21.390581Z

but your getting-started-video project plays very well with cider, which is cool.

tony.kay 2017-04-28T17:36:46.399144Z

I use ideavim for key bindings, and structural editing. I haven't had to touch a config file in years...used to spend 20-30% of my time fiddling...

tony.kay 2017-04-28T17:36:51.400922Z

totally worth the price IMHO

tony.kay 2017-04-28T17:37:14.408611Z

yeah, the videos and project files are meant to work with vim, emacs, spacemacs, IntelliJ

tony.kay 2017-04-28T17:37:19.410331Z

that was something I think is important

tony.kay 2017-04-28T17:38:12.428293Z

I don't like to dictate tools

macrobartfast 2017-04-28T18:28:34.470176Z

I'm trying to run (log-app-state) in the repl and getting 'Unable to resolve symbol: log-app-state'... suggestions?

claudiu 2017-04-28T18:32:14.546820Z

I usually get that when Iā€™m in the clj repl (not the browser repl).

macrobartfast 2017-04-28T18:41:48.740869Z

oh boy... lots to learn here...

macrobartfast 2017-04-28T18:41:56.743138Z

are you in intellij or emacs?

macrobartfast 2017-04-28T18:42:24.753158Z

(I'm not going to get much sympathy probably for emacs/cider issues but hopefully I can hammer through them)

claudiu 2017-04-28T18:50:41.922439Z

Iā€™m using vim šŸ™‚

macrobartfast 2017-04-28T18:53:25.976726Z

ah ok šŸ˜‰

macrobartfast 2017-04-28T18:53:42.982386Z

your earlier clue helped me solve the issue... thanks!

macrobartfast 2017-04-28T19:56:22.130833Z

this is certainly not important, but my component does render when at this point:

macrobartfast 2017-04-28T19:57:56.159522Z

but it seems you're saying in the Base UI video one needs to add a react-key to the div to show changes to, say, the dom/h4 text.

macrobartfast 2017-04-28T19:58:14.165122Z

did something change to enable that?

macrobartfast 2017-04-28T19:59:31.188232Z

the video seems to suggest that one must have (dom/div #js {:key react-key} for changes to hot reload.

macrobartfast 2017-04-28T20:08:22.352112Z

in fact, all it seems to need is the :ui/react-key in the query function to hot reload. It does not reload without that, in accordance with what you say. But apparently the ui hot reloads for me without any mention of the react-key in the render method.

tony.kay 2017-04-28T20:08:33.355226Z

the react key forces a full dom re-render on hot code reload

tony.kay 2017-04-28T20:08:40.357389Z

it isn't needed for production/regular use

tony.kay 2017-04-28T20:08:57.362669Z

if the data changed, you'll also get a proper re-render

tony.kay 2017-04-28T20:09:41.375162Z

Om optimizes rendering by making sure things do not re-render if the data hasn't changed...but if the key has changed, React will ignore that optimization

tony.kay 2017-04-28T20:11:11.401750Z

having the key in the query will actually cause a root re-render (since that bit of data will have changed)...but children may not rerender if the key isn't on the DOM with a new value

tony.kay 2017-04-28T20:11:36.408593Z

trust me, it is needed for non-trivial hot code reload to work well

macrobartfast 2017-04-28T20:11:45.411181Z

aha ok

tony.kay 2017-04-28T20:12:22.422197Z

"you need it" in this case doesn't mean that some cases won't work without it

macrobartfast 2017-04-28T20:12:31.424677Z

gotcha

macrobartfast 2017-04-28T20:13:07.435317Z

the videos are fantastic, by the way, really having a fantastic Friday due to them.

macrobartfast 2017-04-28T20:13:12.436575Z

šŸ˜€

tony.kay 2017-04-28T20:13:19.438692Z

great, glad to hear that