react handling event 1

react handling event

handleClick = event => event.target.classList.add('click-state');

render() {
  return 
Click here
; }

Here is what the above code is Doing:
1. The base-state class is applied to the div.
2. When the div is clicked, the click-state class is applied.
3. The click-state class has a transition property that will animate the background-color property from blue to red.

The transition property is what makes the animation happen. It’s a shorthand property that combines the transition-property, transition-duration, transition-timing-function, and transition-delay properties.

The transition-property property specifies the name of the CSS property that will be transitioned.

The transition-duration property specifies how long the transition will take.

The transition-timing-function property specifies how the transition will progress over time.

The transition-delay property specifies when the transition will start.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s state.

The transition property is applied to the element that changes state.

The transition property is not applied to the class that changes the element’s

Similar Posts