In React you can clearly create an object and assign it as an inline style. i.e.. mentioned below.
var divStyle = {
To Expand on what @PythonIsGreat said, I create a global function that will do it for me:
var css = function(){
var args = $.merge([true, {}], Array.prototype.splice.call(arguments, 0));
return $.extend.apply(null, args);
}
This deeply extends the objects into a new object and allows for a variable number of objects as parameters. This allows you to do something like this:
return(
);
var styles = {
base:{
//whatever
},
first:{
//whatever
},
second:{
//whatever
}
}