In normal JS
events are calling from child -> parent -> parent -> ... -> body
In react, if there are any manual event wired then those will be called first then the events added via react in child => parent manner
// making all uppercase
city.toUpperCase();
//removing spaces and making all lowercase
city = city.trim().toLowerCase();
//capitalizing the first letter
cityCapitalized = city.charAt(0).toUpperCase() + city.slice(1);
Comments