This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Simply run this command in the terminal: npm install
And to spin up the development server: npm run dev
And to run the test suite: npm run test
I used a TDD method to create this little application. Therefore, the test suite was completed prior to any implementation.
I won't offer any explanations about my code since I think excellent code should be self-explanatory and the implementation details should be tested using a descriptive test suite. Instead, I recommend looking at the test suite first to see if the function satisfies the requirements.
At this point, I also understand that TypeScript should be used in my implementation because it will undoubtedly aid in removing invalid input types. But I won't be able to make it in time because of the deadline. If possible, I'll fix it in the following iteration :D