ndresx / react-countdown

A customizable countdown component for React.
MIT License
755 stars 70 forks source link

Types aren't compatible with React v18 #233

Closed robinjoseph08 closed 2 months ago

robinjoseph08 commented 1 year ago

It looks like the types might need to be updated for later versions of React. This is generated from a project using React v18.

$ tsc --noEmit
node_modules/react-countdown/dist/Countdown.d.ts:5:47 - error TS2694: Namespace 'React' has no exported member 'Props'.

5 export interface CountdownProps extends React.Props<Countdown>, CountdownTimeDeltaFormatOptions, Omit<LegacyCountdownProps, 'onComplete'> {
                                                ~~~~~

Found 1 error in node_modules/react-countdown/dist/Countdown.d.ts:5
ndresx commented 1 year ago

Hmm, ok, I'll take a look at this. Thanks for reporting!

suhaibzia786 commented 1 year ago

Still not working with V18 and countdown is not changing

collinkleest commented 1 year ago

I am seeing this as well when running:

$ tsc && vite build

node_modules/react-countdown/dist/Countdown.d.ts:5:47 - error TS2694: Namespace 'React' has no exported member 'Props'.

5 export interface CountdownProps extends React.Props<Countdown>, CountdownTimeDeltaFormatOptions, Omit<LegacyCountdownProps, 'onComplete'> {
                                                ~~~~~
Found 1 error in node_modules/react-countdown/dist/Countdown.d.ts:5
iamvinny commented 3 months ago

Same issue here.