A minimalistic ClojureScript interface to React.js
jhacks 2020-09-17T14:32:23.027100Z

Is it possible to add :hover to an element using hiccup? I’ve tried variations of the attached snippet but the only thing that works is adding the css to a class externally (not inline in hiccup).

p-himik 2020-09-17T14:39:39.027400Z

Pseudo classes cannot be used in inline styles. You will have to use a <style> tag and CSS selectors.

jhacks 2020-09-17T14:52:13.027600Z

Ahhh, thanks for the clarification @p-himik . Much appreciated!

jhacks 2020-09-17T15:35:45.028300Z

Thanks for the links!

p-himik 2020-09-17T16:58:30.029500Z

Can reagent/with-let be safely used within the :reagent-render function of a form-3 component? What about the inner function of a form-2 component?

lilactown 2020-09-17T18:02:09.030600Z

It looks like with-let basically emits the body of a form-2 component

lilactown 2020-09-17T18:02:26.031200Z

So I would not expect you can nest it inside another form-2

lilactown 2020-09-17T18:05:40.031700Z

Hmm maybe I’m wrong. The with-let code is a bit hard to follow

lukasz 2020-09-17T18:19:41.032500Z

More on that - are there any examples on how to use with-let - I only found a reference here and there, but no clear explanation (granted, it was few months ago)

p-himik 2020-09-17T18:20:52.032900Z

@lilactown Not sure I follow. with-let doesn't emit any fn except for the destroy clause.

p-himik 2020-09-17T18:21:22.033Z

Here's one example in the blog post where it was introduced:

p-himik 2020-09-17T18:22:23.033200Z

Another couple here: And there are also tests for it in the Reagent repo.

lilactown 2020-09-17T18:22:51.033600Z

Yeah I was wrong

lukasz 2020-09-17T18:23:20.033700Z

Thanks! That's super helpful - I remember seeing this post, but (silly me) I disregarded it since it was from 2015 ;-)

p-himik 2020-09-17T18:26:12.035200Z

Its implementation is indeed hard to follow, especially given that I'm not that familiar with the rest of the Reagent internals on which with-let relies. But my preliminary assessment along with my intuition tell me that using with-let in form-{2,3} components is prooobably fine. :)

lilactown 2020-09-17T18:34:15.035700Z

It might be cool to add some tests for that

p-himik 2020-09-17T18:43:35.036200Z

Another potential use-case - with-let within with-let.

lilactown 2020-09-17T18:56:15.036800Z

I think that is in reagent tests when I peeked