Skip to content

Conversation

@amrlabib
Copy link
Owner

@amrlabib amrlabib commented Jan 14, 2020

Use only distance in seconds as state in all hooks, and calculate rest of time attributes based on seconds

  1. Change how all hooks state work, move from separate individual states seconds, minutes, hours, and days state to single total seconds state, and calculate all time attributes based on total seconds only, this will limit number of renders to be single render per second

  2. Move all validation functions to Validate util

  3. Create Time util to handle all total seconds to time conversion and time formatting functions

  4. Fix update format props in useTime

@amrlabib amrlabib merged commit a9d1ce3 into master Jan 15, 2020
@amrlabib amrlabib deleted the enhancement/distance branch January 19, 2020 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants