@visualdenniss
Posted
Hello,
your solutions looks great and visually quite pleasing :) I like the smooth hover effects. One thing I'd like to suggest is, currently there seems to be a lot of useStates created. But since they are related states, they can be grouped together as an object. Something like this: const [state, setState] = useState({ bill: null, tipPercentage: 0, numberOfPeople: 0, customTip: "", tip: 0, total: 0, });
This will make the state management cleaner and reduce the number of state updates, which can improve performance. Also it will be easier to keep track of what to update and when, and most importantly, keep them synced. I recommend digging this source as well on this topic: https://react.dev/learn/choosing-the-state-structure
Hope this helps and keep up the great work! :)
Marked as helpful
@shalri
Posted
@visualdenniss Thank you so much for the heads up, sir. I'll definitely dig into it and tighten up my code.