This application showcases two things:
- A react component showing current time and changing color based on divisibility by 3, 5 or 15 .
- A real time indicator of how long the user has been moving the cursor across the page. The timer increases if the movement is in top50% and decreases if mouse movement is in bottom 50%.
A live demo can be seen here https://react-timer-coral.vercel.app/
Node version: v18.14.2
Install the dependencies
npm install
Run the application
npm run start
The application should start on http://localhost:3000
To run the test suite
npm run test
It will also create the coverage report in the /coverage
folder
To run a lint check
npm run lint
To run a lint fix
npm run lint:fix
To run a prettier check
npm run prettier-check
To run a prettier fix
npm run prettier-write
1. The output of Question 1 and Question 2 can be seen in the browser console upon starting the application
src/utils/ReactContext/ReactContext.txt
3. The output of Question 5 and Question 6 can directly be seen on the browser.Upon click of each button the relevant component is rendered.
MIT License