I have a react element that has an inline style like this: (Shortened version)
yes its possible check below
class App extends React.Component {
constructor(props){
super(props)
this.state = {
width:30; //default
};
}
render(){
//when state changes the width changes
const style = {
width: this.state.width
}
return(
//when button is clicked the style value of width increases
);
}
:-)