Digital clock app using react.js
Build a digital clock app using react.js
How to use useEffect
hook in react.js and setInterval method in Javascript.
What does useEffect do?
By using this Hook, you tell React that your component needs to do something after render. React will remember the function you passed (we'll refer to it as our “effect”), and call it later after performing the DOM updates.
When Should You use useEffect?
Well, the idea to use useEffect hook is to execute code that needs happens during lifecycle of the component instead of on specific user interactions or DOM events.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
Thanks goes to these wonderful people (emoji key):
bineetNaidu 📖 |
Bogumił Morawski 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!