The inline styles made the code difficult to read, so added them in the stylesheets for better view and reusability.
Responsiveness:
It is observed that the tracker screen is slow compared to other screens and datepicker constantly gets stuck or difficult to invoke.
Changes:
Optimize state updates: Updated the functions to use the callback methods to make the state updates and useEffect dependencies reduce latency
Excessive re-renders: The preious useEffect component for victoryChart renders the chart multiple times to display the animation style. Modified it to use, requestAnimationFrame and useRef to remove unnecessary re-renders. This has improved the performance by a lot.
Added the loading option to call backend api when month/year is changed and limited date selection to past dates only.
Add expense screen also has style debts, fixed them as it has some similarity with tracker screen. Added conditional checks for mandatory components in the form and display corresponding alert to user.
Resolves #13
Changelog:
Tracker screen:
Add expense screen also has style debts, fixed them as it has some similarity with tracker screen. Added conditional checks for mandatory components in the form and display corresponding alert to user.
Prettify other screens.