This single page application was built with React and Vite, a next generation frontend tooling.
This application demonstrates a custom counter hook with various functionalities like increment, decrement, reset, and setValue functions, implemented with a valid user interface. It also includes a page dedicated to the custom hook, a 404 error page, and a page to test error boundary.
- Custom Counter Hook: Provides functionalities for incrementing, decrementing, resetting, and setting a value for the counter.
- Valid UI implementation: User interface elements are available to interact with the custom counter hook application.
- Page Navigation:
- Custom Hook Page: Dedicated page to showcase the custom counter hook.
- 404 Error Page: Page for handling invalid routes.
- Error Boundary Test Page: Page designed to test error boundaries.
- Clone this repository.
- Navigate to the project directory in your terminal.
- Run
npm installto install dependencies.
Once installed, you can run the application using the command, npm run dev:
This will start the application in development mode and you can view the application using the localhost link provided in your terminal.
The custom counter hook page provides a user interface that demonstrates the functionalities of the custom hook. Users can interact with the counter using the provided buttons and input field.
The 404 error page is displayed when a user navigates to an invalid route within the application. It helps in gracefully handling incorrect URLs or routes.
The error boundary test page is specifically designed to test error boundaries within the application. It contains components that may intentionally throw errors to validate the error boundary behavior and ensure proper error handling within the application.