nosco / hx

A simple, easy to use library for React development in ClojureScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for class shortcut in hiccup: `:div.foo`?

orestis opened this issue · comments

Hi, I've noticed that a very common reagent pattern, i.e. :div.foo to add the foo class to :div isn't supported in hx. Is this by design?

It's not a hill I would die on, but I purposely didn't add it because I never use it.

I'm not completely opposed to adding it, but there are downsides: complecting tag and props complicates threading props down the component tree when you want to override class / id.

It might be useful to help people move from reagent to hx. Is it something you find important?

I would leave it as it is. This specific class and id make my code more understandable.

I just moved https://github.com/laststar/showrum (everything but the README :) ) from run to hx in and this bit me more than once, but still, I like it more this way.

Closing this for now.