Skip to content

A simple React application showing your real current time.

Notifications You must be signed in to change notification settings

kateFrontend/react-current-time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Current Time

cover

🦉 Main information

A simple React application showing your real current time.

The project goal:

  • create simple React application showing your current time;
  • use React class component;
  • create a new Date object for the current time;
  • use toLocaleDateString() method to return a string with a language-sensitive representation of the date portion of this date in the local timezone;
  • use componentDidMount() method to set interval;
  • use componentWillUnmount() method to clear interval;
  • add CSS to make it look nice;

🦊 Useful links

The JavaScript language - Data types

https://javascript.info/date

Date.prototype.toLocaleDateString()

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString

UNSAFE_componentWillMount() method

https://react.dev/reference/react/Component#unsafe_componentwillmount

ComponentDidMount() method

https://react.dev/reference/react/Component#componentdidmount

⚡ Built With

React