Closed vlrmprjct closed 1 year ago
Hey @vlrmprjct - As described in the docs, one of the requirements for the custom component is to use React.forwardRef
. This should fix the react error regarding ref.
As to passing custom props through SnackbarProvider, unfortunately it's not on the roadmap and won't be added any time soon. Sorry about that!
Hello,
my question is about passing additional props (
additionalProp
) using SnackbarProvider and a customized component. It is intended to add a global translation object for example.In this simplifyed example below the
additionalProp
is not existing in the CustomSnack props:I tried this but this returns an error:
The error msg is:
notistack - Custom snackbar is not refForwarding
Is there a way or workaround to add an additional prop ? Maybe I am doing something wrong. A hint would be great.
Thx.