A simple React project that dynamically changes a greeting message and adjusts the text color based on the time of day. The app also displays the current date and time.
Greeting Message: Displays "Good Morning", "Good Afternoon", or "Good Night" based on the current hour of the day.
Dynamic Styles: The greeting color changes with the time of day (red for morning, orange for afternoon, and purple for night).
Current Date and Time: Displays the full date in a readable format (e.g., "Friday 1 June 2024") and the current time.
React (JavaScript library for building user interfaces) JSX (JavaScript XML for writing HTML in JS) CSS (for styling)
The app uses JavaScript's Date object to get the current time (getHours()) and update the greeting message and styles accordingly. The current date is displayed in a user-friendly format like "Friday 1 June 2024". The time is also shown in a readable format, such as 2:30 PM.