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
1- Initial Greeting Load
When the component first loads, display a default greeting message, such as Hello, Guest! Welcome to our site.
2- User Input
Add an input field where the user can enter their name. Store the input in the components state.
3- Update Greeting Button
When clicked, show a loading message, like Loading greeting....
After 2 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!