Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript error on ToastContainer #176

Closed
JoshRandall-Andculture opened this issue May 2, 2018 · 4 comments
Closed

TypeScript error on ToastContainer #176

JoshRandall-Andculture opened this issue May 2, 2018 · 4 comments
Assignees
Labels

Comments

@JoshRandall-Andculture
Copy link

When we add the <ToastContainer /> element in a .tsx file, we receive the error JSX element type 'ToastContainer' does not have any construct or call signatures

If we change the definition for the ToastContainer class in index.d.ts to include the any type for the component state it no longer throws that error. Can this change be made in the repo and re-published to npm?

Doesn't work (current definition):

export class ToastContainer extends React.Component<ToastContainerProps> {}

Does work (manually modified locally):

export class ToastContainer extends React.Component<ToastContainerProps, any> {}
@fkhadra
Copy link
Owner

fkhadra commented May 2, 2018

@JoshRandall-Andculture thanks for the feedback i'll do it now

@JoshRandall-Andculture
Copy link
Author

Awesome, thanks for the quick response @fkhadra!

fkhadra added a commit that referenced this issue May 2, 2018
@fkhadra
Copy link
Owner

fkhadra commented May 2, 2018

@JoshRandall-Andculture I published the v4.0.1. I had to fix a build issue in the mean time.

@fkhadra fkhadra self-assigned this May 2, 2018
@fkhadra fkhadra added the bug label May 2, 2018
@fkhadra
Copy link
Owner

fkhadra commented May 2, 2018

I close the issue, feel free to tell if something else wrong.

@fkhadra fkhadra closed this as completed May 2, 2018
vasiliydolmatov pushed a commit to vasiliydolmatov/react-toastify that referenced this issue Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants