Question: Create a React class component that displays a personalized greeting message. The component should allow a user to input their name, which will update the
Create a React class component that displays a personalized greeting message. The component should allow a user to input their name, which will update the greeting after a short delay. Include a screenshot of the output.
Requirements
Initial Greeting Load
When the component first loads, display a default greeting message, such as Hello Guest! Welcome to our site.
User Input
Add an input field where the user can enter their name. Store the input in the components state.
Update Greeting Button
When clicked, show a loading message, like Loading greeting...
After seconds, display an updated greeting with the entered name. If no name is entered, use "Guest" as the default.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
