Fork me on GitHub
#untangled
<
2017-04-28
>
macrobartfast16:04:26

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

macrobartfast16:04:48

expect some wonky questions. šŸ˜Š

tony.kay16:04:07

A lot of people find the youtube videos really helpful

macrobartfast16:04:40

I'm on on them as we speak!

macrobartfast16:04:56

into the overall project structure one now.

tony.kay16:04:33

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

macrobartfast16:04:22

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

macrobartfast17:04:17

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

tony.kay17:04:00

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

macrobartfast17:04:29

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

macrobartfast17:04:08

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

macrobartfast17:04:27

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

tony.kay17:04:11

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.

macrobartfast17:04:21

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

tony.kay17:04:46

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.kay17:04:51

totally worth the price IMHO

tony.kay17:04:14

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

tony.kay17:04:19

that was something I think is important

tony.kay17:04:12

I don't like to dictate tools

macrobartfast18:04:34

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

claudiu18:04:14

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

macrobartfast18:04:48

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

macrobartfast18:04:56

are you in intellij or emacs?

macrobartfast18:04:24

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

claudiu18:04:41

Iā€™m using vim šŸ™‚

macrobartfast18:04:25

ah ok šŸ˜‰

macrobartfast18:04:42

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

macrobartfast19:04:22

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

macrobartfast19:04:56

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.

macrobartfast19:04:14

did something change to enable that?

macrobartfast19:04:31

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

macrobartfast20:04:22

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.kay20:04:33

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

tony.kay20:04:40

it isn't needed for production/regular use

tony.kay20:04:57

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

tony.kay20:04:41

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.kay20:04:11

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.kay20:04:36

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

tony.kay20:04:22

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

macrobartfast20:04:07

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

tony.kay20:04:19

great, glad to hear that