@dhruv1 no experience with this, but what you're doing there with aget
looks fishy
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
no, scratch that. RadioButton is an ES6 class. Still better to do a (.-RadioButton js/MaterialUI)
, but that probably won't solve your problem
@dhruv1 It seems the MaterialUI stuff expects some React Context to be present to define the theme
If you look at the source for RadioButton
you probably see something like contextTypes {muiTheme String}
(pseudocode because I don't know JS lol)
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 🙂
There's a bit more context around all this in this README https://github.com/madvas/cljs-react-material-ui
Take particular note about the mui-theme-provider
Also there are some Reagent usage notes 🙂