Fork me on GitHub
#reagent
<
2016-02-25
>
slotkenov16:02:01

I’m trying to get it to work with just including the plain MDL css and js files in my HTML and adding the right CSS classes to right HTML tags. Without any luck yet though. The components get some styling, but don’t react to any interaction. Somehow Reagent or React is preventing MDL logic from kicking in I think.

Scot16:02:06

@slotkenov I have had some success. I am using cljsjs/material and the cdn link for the regular css (be sure to require cljsjs.material in your main cljs namespace) . I took queues from the lib @gadfly361 linked, but it is unfortunately not ready for direct use. Essentially, you need to make sure to add :component-did-mount metadata, and promote the element. Look at re-mdl.util fore more info.

Scot16:02:52

I may write a blog post/tweet chain about my exp once finished, but idk yet. Definitely a problem I wanna solve.

maio16:02:21

@slotkenov: last time I tried to use MDL I had to call (js/componentHandler.upgradeDom) after component did mount/update. That's some MDL js call.

slotkenov17:02:20

Thanks @scot-brown and @maio I'll try that. Would you think it wise to use in production?

Scot17:02:45

It depends on how willing you are to maintain your adapters

slotkenov17:02:51

And would there be any other GUI libs recommended for use with reagent?

Scot18:02:22

I am currently writing adapters for mdl as I need them, but it is kind of annoying. Bootstrap is really good for getting started, and is the only other UI tool I’ve used. I know some people heavily advocate semanticUI and Foundation, but I can’t comment personally.

gadfly36118:02:34

+1 for semantic ui

roberto23:02:59

I tried MDL for a while, and gave up on it.

roberto23:02:21

you have to keep calling some MDL js function everytime the dom changes

roberto23:02:37

that is what I remember about it, and finding it annoying