I am trying to use material-ui with Radium. Now given that Radium doesn't mess with the style prop of non-DOM elements I would have to use the wrapper workaround suggested in the FAQ:
A workaround is to wrap your custom component in Radium, even if you do not have the source, like this:
var Link = require('react-router').Link;
Link = Radium(Link);
However, this will not work with ES6 module imports as the imported components are read only.
import RaisedButton from 'material-ui/lib/raised-button';
RaisedButton = Radium(RaisedButton);
this will not compile.
Is there a way around it?
Use a new variable name instead of reassigning it:
import RaisedButton from 'material-ui/lib/raised-button';
const RadiumRaisedButton = Radium(RaisedButton);
or
import {RaisedButton as OriginalRaisedButton} from 'material-ui/lib/raised-button';
const RaisedButton = Radium(OriginalRaisedButton);
Most helpful comment
Use a new variable name instead of reassigning it:
or