This is a simple React application that allows a user to add a username and age, which are then displayed in a list of users. The user's input is validated to ensure that both the username and age are valid.
This application was built using the following technologies:
- React
- JavaScript
- HTML
- CSS
- Vite
These instructions will help you get a copy of the project up and running on your local machine for development and testing purposes.
-
Clone the repository to your local machine using the following command:
git clone https://github.com/replayzor/add-username.git
-
Navigate to the project directory:
cd add-username
-
Install the required dependencies:
npm install
-
Start the application
npm run dev
Once the application is running, you can add a new user by entering a username and age in the input fields and clicking the "Add User" button. If either the username or age is invalid (i.e. empty or non-numeric), an error message will be displayed.
The list of users is updated in real-time as new users are added.