Fork me on GitHub
Patrick Brown00:06:37

Is there a requiring-resolve workaround in cljs?


which part do you mean? there is no dynamic require but there is resolve. can't have dynamic require outside the REPL or a self-hosted build though.


I have seen in one of the doc , the way button is defined as [:button.btn.btn--link.tooltip] , what is the use of -- in this


It's just a part of the class name, btn--link.


so it could be also ?


Well, that would be two classes then, btn and link. If you need to have a dot as a part of a class name, you can't use that shorthand - instead, you'd use the :class property.


Or if you mean that you can write instead of btn.btn--link - well, if you're the author of the relevant CSS and if you don't have any DOM queries that rely on btn--link, then sure. But it would also have to be a very careful decision from a design standpoint. btn--link is very clearly for a button whereas link is who knows for what. Given that you can mix multiple CSS classes, going with plain link might make some things much harder.

🙌 1

there are several naming patterns for CSS. this looks like BEM, see

🙌 1

what is the use :> symbol in clojurescript? where can I find doc for this?


Most likely, you're using Reagent. The symbol itself is nothing special in CLJS, but Reagent treats it as a special component where the second argument is a native component. Documented somewhere in the Reagent's repo.


Someone here have a working example of memfn in CLJS?


got it:

((memfn startsWith prefix) "abc" "a")