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
since enqueueSnackbar is defined as an arrow function, you can't bind. It already has "this" to the instance of the class. That's why the global variable works without bind. the context value should be just se to enqueueSnackbar without binding. If I understood everything correctly.
The text was updated successfully, but these errors were encountered:
Expected Behavior
SnackbarProvider code is simple
Current Behavior
SnackbarProvider code works but has useless bind or contextValue enqueueSnackbar
I stumbled on this while browsing the code
https://github.com/iamhosseindhv/notistack/blob/master/src/SnackbarProvider/SnackbarProvider.tsx#L51
since enqueueSnackbar is defined as an arrow function, you can't bind. It already has "this" to the instance of the class. That's why the global variable works without bind. the context value should be just se to enqueueSnackbar without binding. If I understood everything correctly.
The text was updated successfully, but these errors were encountered: