useCountdown Hook
Changelog
- [x] Updated documentation
- [x] Updated React peer dependencies to
>= 16.8.0for Hook support - [x] Deprecated
childrenprop in favor of therendererprop - [x] Removed standard
<span />output for React Native compatibility (results in removedclassNamesupport) - [x] Updated and refactored existing typings
- [x] Updated examples
- [x] Migrated to ESLint
Enhancements
- [x] Added
useCountdownHook 🎣 - [x] Added
pureprop for better clarity of prop changes - [x] Added
millisecondsto time delta information
Coverage remained the same at 100.0% when pulling 91fe1e6ff0b779ad1540d328f567344825f5635c on use-countdown-hook into c909d9746bc79cdc9b8866d98284b0256d643a1a on master.
@ndresx Do you have any plan to release this?
I'm having problems to use the start() function as i explained before in other issue, now i'm trying to get the api() from the render but i can't:
const Timer = ({ hours, minutes, seconds, completed, props }) => {
const { className, renderer } = props;
let time = completed ? `Is completed!` : `${hours}:${minutes}:${seconds}`;
console.log('====================================');
console.log(renderer.api.start());
console.log('====================================');
return (
<StepLabel
alternativeLabel
StepIconComponent={StepIcon}
StepIconProps={{
classes: {
root: className
},
icon: time
}}
/>
);
};
render.api is undefined, getting api from props gives me the same result, i don't know what is the problem.
Thanks.
@SalahAdDin I have, but I am still working and tweaking some things. I have posted a possible solution into the other issue thread, please take a look at the provided code there; I hope it helps!
:+1:
@ndresx Any plan on this to merged in master so we can use it in react-native as well.
@kishoretankhupp Yes, but it, unfortunately, might still take a bit until then. I hope I can wrap it up soon though!
@ndresx We are still waiting for this.