This is a React project, created with create-react-app (CRA), that shows 2 clocks:
- One created with a class and using setState(),
- And the other built with hooks (useState and useEffect).
You can RUN THE PROJECT: go to this url https://silvanabgn.github.io/react-clock/
Developed with React v17 (2021).
I wanted to create a tiny easy static React page, to compare Class lifecycle vs Hooks. So this clock idea was born.
My LinkedIn: https://ar.linkedin.com/in/silvanabelengarcia
This project was bootstrapped with Create React App.
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.
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!
See the section about deployment for more information.
After running a npm run build
, this command deploys the running app into https://silvanabgn.github.io/react-clock/
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify