Fork me on GitHub
#lambdaisland
<
2016-12-17
>
plexus10:12:20

@dhruv1 no experience with this, but what you're doing there with aget looks fishy

plexus10:12:09

pulling a function out like that will lose track of this, which might be your problem. It's also a recipe for getting troubles with advanced compilation

plexus10:12:57

no, scratch that. RadioButton is an ES6 class. Still better to do a (.-RadioButton js/MaterialUI), but that probably won't solve your problem

martinklepsch15:12:03

@dhruv1 It seems the MaterialUI stuff expects some React Context to be present to define the theme

martinklepsch15:12:46

If you look at the source for RadioButton you probably see something like contextTypes {muiTheme String} (pseudocode because I don't know JS lol)

martinklepsch15:12:12

What you'll need to do is set this context at the root of your component tree and then also create components that have contextTypes as above. I haven't done this with Reagent but I'd say it's a bit more advanced so depending on your experience you may want to choose this battle wisely 🙂

martinklepsch15:12:30

There's a bit more context around all this in this README https://github.com/madvas/cljs-react-material-ui

martinklepsch15:12:47

Take particular note about the mui-theme-provider

martinklepsch15:12:18

Also there are some Reagent usage notes 🙂