Answer by lissettdm for Cannot set property 'color' of undefined getting this...
If you want to update the color property, add styling_text object to the component state:class InlineDynamic extends React.Component { constructor() { super(); this.state = { styling_text: { color:...
View ArticleAnswer by Musa for Cannot set property 'color' of undefined getting this...
Declare styling_text outside of renderclass InlineDynamic extends Component{ changeColor = () =>{ this.styling_text.color="black" }; styling_text = {color:"red"}; render(){ return(<div><h1...
View ArticleCannot set property 'color' of undefined getting this error in React
I am trying to change colour of text in h1 tag when I click button. I am calling change colour function but when onclick it executes at that time it is showing error in the inside statement [...
View Article
More Pages to Explore .....