You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No error should occur on <SnackbarProvider /> render.
Current Behavior
Error is thrown as soon as SnackbarProvider is rendered, complaining about the prop type definition. (note: functionality is not affected, just console spam)
Steps to Reproduce
I didn't manage to repro this on sandbox, Im not sure why. Build is completely fine, but this is output in the console:
Warning: Failed prop type: SnackbarProvider: prop type `TransitionComponent` is invalid; it must be a function, usually from the `prop-types` package, but received `undefined`.
I debugged a bit and found that TransitionComponent propType is: TransitionComponent: undefined, meaning propType passed doesn't exist.
Solution?
I changed in node_modules prop type for TransitionComponent to func, which then supplied propType and no complains from then on. Solution here: #130
Your Environment
Tech
Version
Notistack
v0.8.6
React
v16.8.6
Browser
Chrome 74
Typescript
v3.4.5
The text was updated successfully, but these errors were encountered:
I took a closer look, and found out what the root-cause is.
It looks like 15.6.2 prop-types version doesn't support elementType, and package.json still uses 15.6.2.
But the package-lock.json is using 15.7.2 which doesn't cause this issue.
So, if you use "yarn" to build your project, it will read in package.json and install 15.6.2 version of prop-types which doesn't support elementType.
I think we just need to update the package.json to have proper version as well. I wonder how the package.json and package-lock.json got out of sync.
Expected Behavior
No error should occur on
<SnackbarProvider />
render.Current Behavior
Error is thrown as soon as SnackbarProvider is rendered, complaining about the prop type definition. (note: functionality is not affected, just console spam)
Steps to Reproduce
I didn't manage to repro this on sandbox, Im not sure why. Build is completely fine, but this is output in the console:
I debugged a bit and found that TransitionComponent propType is:
TransitionComponent: undefined
, meaning propType passed doesn't exist.Solution?
I changed in node_modules prop type for TransitionComponent to
func
, which then supplied propType and no complains from then on. Solution here: #130Your Environment
The text was updated successfully, but these errors were encountered: