I've got this very basic component:
Tile = React.createClass({
render: function(){
var styles = [
TileStyles.tile
];
return (
<div style={styles} test="test" />
);
}
});
Unfortunately it is producing this html:
<div style="0:[object Object];" data-reactid=".0.$0"></div>
Why does it give me [object object] instead of the inline styles? Obviously I don't need to use an array here but I do on a more complex component.
What am I doing wrong?
UPDATE: Thanks for the answers guys but the issue is I WANT to be able to use multiple styles.
aka use TileStyles.tile and TileStyles.active under certain circumstances.