Holiday Planner
Description
The problem
- Create a tool that can calculate needed holiday days in the time period.
The challenges
- What language to use?
- Java, TypeScript, JavaScript, etc.
- New libraries that I have never used before (really) and needed to study a little
- lodash
- date-fns
- @wojtekmaj/react-daterange-picker
- React
- I decided to use hooks that are the future of React 🐱💻
- Still learning React so this may look like it (tried my best)
- Some problems with updating view with correct values were ordinary.
Potential improvements
- Change to TypeScript, further abstraction
- Interfaces and Enums without compromises
- Error messages
- From ugly alert box to React components displaying errors in UI.
Compromises
- JavaScript
- Not really an OOP language, but I figured it too late 🤦♂️
- Enums are not in JavaScript so made a quite near equivalent to it.
- React Hooks over Classes
- I have not made React apps with classes, but I'm very eager to learn those too if I get in!
- Error messages
- Quick alert boxes
How to use this?
Run npm install
and npm start
in project root.