swiftcarrot / react-progress-label

Progress component for React and React Native

Home Page:https://swiftcarrot.dev/react-progress-label

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using component with typescript (Ionic) ?

efsjouw opened this issue · comments

commented

Hello, I am just starting to get into react/typescript etc. so I just thought to ask wether this a problem only on my end on with this component.

When using this component in Ionic I encountered the message:

'ProgressLabel' cannot be used as a JSX component.

Now after some reading I fixed it by changing the following in the "index.d.ts"

export default class ProgressLabel extends Component<ProgressLabelProps,void> {}

to

export default class ProgressLabel extends Component<ProgressLabelProps,object> {}

Not sure why this works as I basically just started trying things out, so would also be nice to get a little explanation if anyone knows...

updated in 3.1.7