In React you can clearly create an object and assign it as an inline style. i.e.. mentioned below.
var divStyle = {
Need to merge the properties in object. For Example,
const boxStyle = { width : "50px", height : "50px" }; const redBackground = { ...boxStyle, background: "red", }; const blueBackground = { ...boxStyle, background: "blue", }