This app is an example of my ReactJS code for the job interviews. It is loan pricing calculator, where when you change the values, you see different outputs.
I built this project in these technologies:
- TypeScript
- NextJS
- Tailwind CSS
- ReactQuery
Interesting information about this implementation:
- First initial data are loaded with NextJS GetStaticProps
- When user create some 2 slider combination which is the same, data are cached and there are no additional request. It works even, when you are offline.
- Default error screen
- Network component for handling loading, error and data state
- I used useRef instead of useState for getting values from the input sliders
- Custom reducers instead of useState
- Universal useFetch function for getting the data
- Optimalisation - prevent additional API calls, when user moves with the slider.