Rob Levin
1 min readJun 7, 2019

--

Ok, I went ahead and forked it:

So far, I’ve used durations and diff instead to accurately account for same day problem as mentioned before. I had to account for fact that zero is falsy, so the check for days needed to be

{(days || days === 0) && (
<div className='countdown-item'>

Another thing I’m interested in doing if I get some more time is to convert it to a function based component and remove all lifecycle hooks e.g. useEffect instead of componentDidMount. Not a criticism, just something I want to try if I get time :) Thanks again for fun project!

--

--

No responses yet